📜  into in sql 代码示例

📅  最后修改于: 2022-03-11 15:05:20.800000             🧑  作者: Mango

代码示例3
-- INTO copies specified columns into a new table
SELECT *
INTO newtable [IN externaldb]
FROM oldtable
WHERE condition;

SELECT column1, column2, column3
INTO newtable [IN externaldb]
FROM oldtable
WHERE condition;

Eg: SELECT * INTO CustomersBackup
    FROM Customers;
    
    SELECT * INTO CustomersBackup IN 'Backup.mdb'
    FROM Customers;
    
    SELECT CustomerName, ContactName INTO CustomersBackup2017
    FROM Customers;