SQL Server leads database data into Excel document method
Recently the company needs to download Uniport data to compare with the previous data, so there is no need to export the database data, the SQL Server table data exported to Excel files in two ways.
For SQLServer2005 or SQLServer2008, SQLServer2008 R2
method One : For write query SQL statement is the direct Write query statement query results. Such as:
Next to the desktop, create a new empty Excel file.
Next go back to SQL Server query interface. Right-click on the blank column in the upper-left corner of the query results and click "Copy with Title". The data has been copied. Such as:
(Note: This method is not applicable in navicat)
Then open the previously built Excel file to paste the copied data into Excel. Such as:
method Two : Use the database export method for queries that do not write query SQL statements.
Select the database where you want to export the data, and right-click will bring up a right-click menu. Click "Tasks" and click "Export Data (x)". Such as:
Clicking on "Export Data (x)" will pop up an interface and fill in the good information. Such as:
Click Next to jump to the interface as in 1. With the Excel type selected in the target, the interface information is changed and the exported Excel path is selected. such as 2.
Click Next to jump to the following screen and select the first option. Such as:
Click Next and tick the table you want to export. Such as:
Click Next to jump to the following screen:
Click Next: Jump to such as 1 interface, select Next click Finish, will jump to such as 2 interface. The proof has been exported successfully.
When you open Excel, you can see the exported Excel. Such as:
SQL Server leads the database's data into an Excel document method