SQL Server table and Excel data bulk copy method
One, SQL Server table data copied to Excel
Method:
1. Create a new query and read the table data using SQL statements
2. Then, select data, right-click "Copy" (If you need a table field name, click Copy with title)
3. Paste it directly in Excel.
II. Excel copy to SQL Server table data
Method 1:
1. Open Excel to copy the data.
2. Open the SQL table in edit state
3. Right click on the bottom row of the table to the left of the ordinal, select paste (note: Excel column must correspond to the columns of the SQL table)
4. If there is a self-increment, do not copy the self-increment field.
Method 2:
(Simple steps: http://jingyan.baidu.com/article/358570f66145a6ce4724fcba.html)
1. Right-click on the database and select "Tasks", select "Import Data", 1.
Figure 1
2. Select the database that you want to import the Excel table in, and if you have auto-numbered, remove the AutoNumber column (Note: Excel columns and SQL table columns, data types need to correspond), do not enable automatic numbering.
3. Click Next and finish, and it will be done.
Method 3:
Importing data in the C # language
SQL Server table and Excel data bulk copy method