Reputation: 401
Why m i getting error incorrect syntax near the keyword IN
in the following query?
select * into persons_backup IN 'HRMS.mdb' from persons
Thank you
Upvotes: 0
Views: 2325
Reputation: 453426
Assuming SQL Server (based on your previous question) you would need
select *
into persons_backup
from HRMS.mdb.persons
or
select *
into HRMS.mdb.persons_backup
from persons
dependant upon what you are trying to do exactly. See SELECT ... INTO
syntax here
Upvotes: 3
Reputation: 30775
Assuming you want to add all rows from persons into another table persons_backup:
Insert into persons_backup select * from persons;
Depending on the RDBMS you use, you might have to put () around the select.
Upvotes: 1