导入表数据txt_MySQL
来源:懂视网
责编:小采
时间:2020-11-09 20:07:19
导入表数据txt_MySQL
导入表数据txt_MySQL:导入表数据 txt mysql> load data infile D:/import.txt into table shop; 输出: Query OK, 5 rows affected (0.08 sec) Records: 5 Deleted: 0 Skipped: 0 Warnings: 0 txt文档中内容: 6 bag 180 j
导读导入表数据txt_MySQL:导入表数据 txt mysql> load data infile D:/import.txt into table shop; 输出: Query OK, 5 rows affected (0.08 sec) Records: 5 Deleted: 0 Skipped: 0 Warnings: 0 txt文档中内容: 6 bag 180 j
导入表数据 txt
mysql> load data infile "D:/import.txt" into table shop;
输出:
Query OK, 5 rows affected (0.08 sec)
Records: 5 Deleted: 0 Skipped: 0 Warnings: 0
txt文档中内容:
6 bag 180 jd A 500
7 ipad air2 3500 tmall B 500
8 Sony Camera 1800 jd B 200
9 knife 6 tmall A 500
10 shoes 300 jd B 80
导入后查询数据:
mysql> select * from shop;
输出:
+----+-------------+---------+---------------+------+-------+
| id | name | price | supplier_name | sort | count |
+----+-------------+---------+---------------+------+-------+
| 1 | apple | 2.50 | dangdang | A | 500 |
| 2 | book | 8.50 | tmall | B | 500 |
| 3 | book | 1.20 | jd | B | 200 |
| 4 | apple | 1.50 | tmall | A | 500 |
| 5 | pen | 8.50 | jd | B | 80 |
| 6 | bag | 180.00 | jd | A | 500 |
| 7 | ipad air2 | 3500.00 | tmall | B | 500 |
| 8 | Sony Camera | 1800.00 | jd | B | 200 |
| 9 | knife | 6.00 | tmall | A | 500 |
| 10 | shoes | 300.00 | jd | B | 80 |
+----+-------------+---------+---------------+------+-------+
10 rows in set (0.00 sec)
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
导入表数据txt_MySQL
导入表数据txt_MySQL:导入表数据 txt mysql> load data infile D:/import.txt into table shop; 输出: Query OK, 5 rows affected (0.08 sec) Records: 5 Deleted: 0 Skipped: 0 Warnings: 0 txt文档中内容: 6 bag 180 j