How To Export Excel In SQL Table

In this article, we will learn how to export data from SQL to excel file.

Below is a selection from the “tblEmployees” table:

SELECT * FROM tblEmployees;

There are 2 ways to export data from SQL to Excel.

  • Method 1:

The one of the possible way to export data from SQL to excel file is a simple copy paste.

Step 1:

Firstly, run a Select query in the SQL Management Studio.

Step 2:

Now, right click on Results area and click on the Select All option (Ctrl + A).

Step 3:

Then again right click on Results area, and click on the Copy with Headers option (Ctrl + Shift + C).

Step 4:

Now, Open Microsoft Excel’s blank workbook.

Then right click on first cell, and click on the Paste option (Ctrl + V).


  • Method 2:

The other way to export data from SQL to excel is follow the same process as How To Import Excel In SQL Table, simple reverse the Source and the Destination. Earlier, the source was Excel and destination was SQL, now the source will be SQL and the destination will be Excel.


Also, check How To Get Second Highest Salary Using Query In SQL

Submit a Comment

Your email address will not be published. Required fields are marked *


Select Categories