使い始めた長い取引がありBEGIN
、最後の3行前にミスをしました。その行を無効にする方法はありますか?
次に例を示します。
BEGIN TRANSACTION;
CREATE TABLE purchase(id integer PRIMARY KEY, purchasePrice integer CHECK(purchasePrice>0), customer text);
INSERT INTO purchase(purchasePrice, customer) VALUES(1200, "Jerome");
INSERT INTO purchase(purchasePrice, customer) VALUES(200, "Jeffery");
INSERT INTO purchase(purchasePrice, customer) VALUES(40, "Craig");
INSERT INTO purchase(purchasePrice, customer) VALUES(1640, "Donovan");
INSERT INTO purchase(purchasePrice, customer) VALUES(100, "Williams");
INSERT INTO purchase(purchasePrice, customer) VALUES(50, "Matsushi");
INSERT INTO purchase(purchasePrice, customer) VALUES(150, "Xhao");
INSERT INTO purchase(purchasePrice, customer) VALUES(250, "Dilberta");
INSERT INTO purchase(purchasePrice, customer) VALUES(840, "Brow"); //Supposed to be 9440,"Brown"
INSERT INTO purchase(purchasePrice, customer) VALUES(440, "DarkBrown");
INSERT INTO purchase(purchasePrice, customer) VALUES(20, "Black");
COMMIT;
影響を受ける行を後で更新できることを理解しています。
別の状況の例:
BEGIN TRANSACTION;
CREATE TABLE Movies(MId integer primary key autoincrement, Title text);
INSERT INTO Movies VALUES(1,'Capote');
INSERT INTO Movies VALUES(2,'Scent of a woman');
INSERT INTO Movies VALUES(3,'Stigmata');
INSERT INTO Movies VALUES(4,'Exorcist');
INSERT INTO Movies VALUES(5,'Hamsun');
//Changed my mind and want to name the table "movie" and name the columns "m_id" and "title".
だから、私は疑問に思っていますa)キャンセルする方法。b)数行上に行くことは可能ですか?もしそうなら、どのように?