SQL Simple -> Save table/query into table in external Database file

You can use INTO clause to save table/query into another table. But you can save table in external MS-Access Database file as well. It actually exports your data from current file to external database file. And it works from SQL query when you add detailed export path to table name after INTO. In this example we suppose, that in addition to your current database you have another named demo_bak.mdb :


SELECT *
INTO demo_table_Backup
IN 'C:\data\backups\Demo_bak.mdb'
FROM demo_table



Actually you can read data from external file also. Write file name and path after "IN", and you get it:


SELECT *
FROM demo_table_Backup
IN 'C:\data\backups\Demo_bak.mdb'




sqlexamples.info