Question: For this question, you can optionally use the PostgreSQL database for this course to check your work. Suppose you created the following table: CREATE TABLE

For this question, you can optionally use the PostgreSQL database for this course to check your work.
Suppose you created the following table:
CREATE TABLE movie(
movie_id SERIAL PRIMARY KEY,
movie_name VARCHAR NOT NULL
);
Which of the following is a correctly formatted INSERT statement that will successfully add a new record that uses the auto-incremented primary key into this table?
launch database
A.)
INSERT INTO movie (movie_name)
VALUES ("Star Wars");
B.)
INSERT INTO movie (movie_id, movie_name)
VALUES (1, 'Star Wars');
C.)
INSERT INTO movie (movie_name)
VALUES ('Star Wars');
D.)
INSERT INTO movie (movie_id, movie_name)
VALUES (nextval, 'Star Wars');

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!