SQL Server table and Excel data bulk copy method

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.