You are using a database named SalesDB to keep all sales records. The SalesDB database contains a table named Orders. You are required to create a new table named OldOrders and transfer all the data from the Orders table to the new table. Which of the following statements will you use to accomplish the task?
SELECT INTO
Correct:
SELECT INTO
Explanation:
Answer option B is correct.
According to the scenario, you will use the SELECT INTO statement. This statement creates a new table and copies the data from the existing table as per the given criteria. This statement is used as follows:
SELECT * INTO OldOrders FROM Orders
Answer option A is incorrect. The INSERT INTO statement is used to insert data in an existing table. It does not create a new table. The statement is used as follows:
INSERT INTO VALUES(value1,value2)
Answer options D and C are incorrect. There is no such statement as ADD INTO or IMPORT INTO.