SQL statements were executed in the following order:
CREATE TABLE fmaster
(id INTEGER PRIMARY KEY, name TEXT);
CREATE TABLE ftrans
(id INTEGER REFERENCES fmaster (id), stat INTEGER, date DATE);
INSERT INTO fmaster VALUES (1, 'itemA');
INSERT INTO ftrans VALUES (1, 1, CURRENT_DATE);
Select two SQL statements that will generate an error when executed next.
- INSERT INTO ftrans VALUES (1, 1, CURRENT_DATE);
- INSERT INTO ftrans VALUES (2, 1, '2007-07-07');
- UPDATE fmaster SET name = 'itemAX' WHERE id = 1;
- UPDATE fmaster SET id = 100 WHERE id = 1;
- UPDATE ftrans SET id = 200 WHERE id = 1;
Reveal Solution
Next Question