bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL SELECT INTO Keyword

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind SQL SELECT INTO Keyword?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ * INTO CustomersBackup2017
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The following SQL statement uses the IN clause to copy the table into a new table in another database:
The following SQL statement creates a backup copy of Customers:
The SELECT INTO command copies data from one table and inserts it into a new table.

Select Into

The SELECT INTO command copies data from one table and inserts it into a new table.

The following SQL statement creates a backup copy of Customers:

SELECT * INTO CustomersBackup2017
FROM Customers;

The following SQL statement uses the IN clause to copy the table into a new table in another database:

SELECT *
INTO CustomersBackup2017 IN 'Backup.mdb'
FROM Customers;

The following SQL statement copies only a few columns into a new table:

SELECT CustomerName, ContactName INTO CustomersBackup2017
FROM Customers;

The following SQL statement copies only the German customers into a new table:

SELECT *
INTO CustomersGermany
FROM Customers
WHERE Country = 'Germany';

The following SQL statement copies data from more than one table into a new table:

SELECT Customers.CustomerName, Orders.OrderID
INTO CustomersOrderBackup2017
FROM Customers
 LEFT JOIN Orders
 ON Customers.CustomerID = Orders.CustomerID;

Previous

SQL SELECT DISTINCT Keyword

Next

SQL SELECT TOP, LIMIT and ROWNUM Keywords