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(
volunteer_id SERIAL PRIMARY KEY,
first_name VARCHAR NOT NULL,
last_name 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 (first_name, last_name, phone)
SELECT first_name, last_name, phone
FROM customer;
b.)
INSERT INTO volunteer (first_name, last_name, phone)
SELECT first_name, last_name, phone
FROM customer
RETURNING *;
c.)
INSERT INTO volunteer (volunteer_id, first_name, last_name, phone)
SELECT first_name, last_name, phone
FROM customer;
d.)
INSERT INTO volunteer
SELECT first_name, last_name, phone
FROM customer
RETURNING *;

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!