Question: Suppose you created the following table: CREATE TABLE book ( book _ id SERIAL PRIMARY KEY, book _ name VARCHAR NOT NULL ) ; Which
Suppose you created the following table:
CREATE TABLE book
bookid SERIAL PRIMARY KEY,
bookname VARCHAR NOT NULL
;
Which of the following INSERT statements uses the NEXTVAL function correctly to add a new record to the table?
launch database
A
INSERT INTO book bookid bookname
VALUES NEXTVALbookbookidseq''Lord of the Rings';
B
INSERT INTO book bookid bookname
VALUES NEXTVAL 'bookbookidseq','Lord of the Rings';
C
INSERT INTO book bookname
VALUES NEXTVALbookbookidseq''Lord of the Rings';
D
INSERT INTO book bookid bookname
VALUES NEXTVALbookbookidseq'Lord of the Rings';
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
