Quickly import Excel data into SQL Server database without code

Mainly through the import function of SQL Server

Because I am already familiar with the format, I write the process directly

1. First obtain an Excel table that conforms to the format (the format that can be imported into the database Excel is 97-2003)

 The field name is the field name of the database table you want to import (the table is only used as a temporary table after importing), and the table name is the table name of the temporary table

Replace this table with a table that conforms to the database import format (see the database requirements for the specific format)

 Remember the location of this table after saving

Open the SQL Server database (database may be different)

Select the corresponding database ---> right-click to select the task ---> select import data

 Then it is basically a fool's operation (next step)

slightly

Here the data source selects Excel

Select the table of the previous 97-2003 version and click Next

 

 Source --- is the sheet name of the previous Excel

Target --- is the name of the table stored in the database

Click next (it's always next)

Click here to complete (the data within 10w is basically 10 seconds)

 After the operation is complete, go to the database to find the table (there will be multiple $ after the table name)

Open the table to view the data

Then create a table dedicated to storing other data

use sql

insert into 表名  select * from 临时表

If the field is accurate, write the field (grammar will not be checked online)

Delete the temporary table after the operation is complete

In this way, the data of other systems will go to the database of this system.

Guess you like

Origin blog.csdn.net/weixin_47035997/article/details/126634431