May 2020
Beginner
564 pages
14h 9m
English
Oracle, PostgreSQL, and SQL Server all offer the same way of creating a new table and inserting data into it from an existing table; however, they MySQL differs from all of these.
In Oracle, PostgreSQL, and SQL Server, if you want to create a new table and insert data into it, you use the SELECT...INTO statement, rather than CREATE TABLE, then use the SELECT statement, as in MySQL. You can execute the following query to create a new table from an existing table via a SELECT statement:
SELECT * INTO managerscopyFROM managers;
You can also specify column names instead of selecting them all, as in the following query:
SELECT playerID, yearID, teamID, G INTO managerscopyFROM managers;
The previous query creates a ...
Read now
Unlock full access