--NOT WORKING
SELECT * INTO CustomersTOnextDB IN 'BackupDB'
FROM Customers;
I am trying to Copy Data from One Table to the Other Database Table But the query is not working
Kristen
#3
or ... if the CustomersTOnextDB table already exists, in the BackupDB database, then
INSERT INTO BackupDB..CustomersTOnextDB
SELECT *
FROM Customers;
This assumes that the columns in BackupDB..CustomersTOnextDB table are in the same sequence as the column in the Customers table in the connected-database. This is a somewhat risky proposition as that may change in the future. SELECT * is always risky in that regard, so you might prefer to do
INSERT INTO BackupDB..CustomersTOnextDB
(
Col1, Col2, ...
)
SELECT Col1, Col2, ...
FROM Customers;