In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail what are the two methods of importing the data from the excel table into the sql database. The content of the article is of high quality, so the editor will share it for you to do a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Originally, I was recently studying the Wechat public platform, but the boss temporarily assigned me a task to import the data in the excel table into the sql database. I think this so easy. I didn't expect to spend two days on it.
To introduce the situation: there are tables with the following structure in the database (Table A)
I only take the key and there is a lot of data in the column.
There is an excel file (table B) with id and name and N tables with similar structure (table C) with excel (without id column).
My task finds the id corresponding to the data in the C table in the B table, then adds id to the C table, and finally updates the data in the A table with the data in the C table according to the fact that the id is unique. This mainly involves the conversion between excel tables and database tables.
Plan 1: use excel+MySQL for Excel to deal with
MySQL for Excel is a plug-in for excel to directly operate the mysql database, you can modify the database like excel tables, of course, you can also merge tables. Plug-in installation, everyone Baidu bar.
There is a problem when using this. MySQL for Excel can connect to the local database, but the database on the server is always unable to connect. Option 1 bankruptcy
Scheme 2: import the excel table directly into the database and operate it with SQL statement.
It should be noted here that 2.1 is the mobile phone number in the excel table should be set to text format, the second is to unify the use of traditional characters. When space garbled occurs, delete the space and rewrite the input.
On the data in the excel table into the sql database what the two methods are shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.