how to import sql query data in excel code example
Example 1: import excel to sql
You can also use OPENROWSET to import excel file in sql server.
SELECT * INTO Your_Table FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=C:\temp\MySpreadsheet.xlsx',
'SELECT * FROM [Data$]')
Example 2: sql query to import data from excel to mysql
$ mysql -u root -p --local-infile
mysql> create database boatdb;
mysql> use boatdb;