Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

To export an execl form in MySQL query browser

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Export:

To export an execl form in MySQL query browser, simply click file and select export execl (enter the form first! ).

Import:

It is a bit troublesome to import too much data in the database, how to import the data from excel directly into the database?

The first step

Save as a txt document, preferably the table name of the database.

Here we want to save the one where the text file is separated by tabs so that our data will not be cluttered.

Step two

Open the txt document, click Save as, change the code, solve the Chinese utf8.

At this time, the file name must be the same as the table name you want to import, otherwise there will be errors in the load. In addition, if the execl you create has a header, then you need to remove the header and retain only the data. In the database, you need to establish the table and the header, which corresponds to the data of the txt.

Step three

Open the mysql command line, enter the following command, pay attention to the file location, database table.

Load data local infile'DRV _ hand data.txt 'into table data1 fields terminated by'\ t'

Among them

D:/data.txt

Is the location of the file

Data1

Is the table of the database

And then enter the car.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report