Question: For this question, use the PostgreSQL database for this course. Suppose you created the following table: CREATE TABLE volunteer ( volunteer _ id SERIAL PRIMARY
For this question, use the PostgreSQL database for this course.
Suppose you created the following table:
CREATE TABLE volunteer
volunteerid SERIAL PRIMARY KEY,
firstname VARCHAR NOT NULL,
lastname VARCHAR NOT NULL,
phone VARCHAR
;
Given this new table, which INSERT statement would query from the customer table to insert the first names, last names, and phone numbers of all customers in the right columns and then display the contents of the volunteer table?
LAUNCH DATABASE
a
INSERT INTO volunteer firstname, lastname, phone
SELECT firstname, lastname, phone
FROM customer;
b
INSERT INTO volunteer firstname, lastname, phone
SELECT firstname, lastname, phone
FROM customer
RETURNING ;
c
INSERT INTO volunteer volunteerid firstname, lastname, phone
SELECT firstname, lastname, phone
FROM customer;
d
INSERT INTO volunteer
SELECT firstname, lastname, phone
FROM customer
RETURNING ;
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
