MYSQL(将数据加载到表中)
1. 创建和选择数据库
mysql> CREATE DATABASE menagerie;
mysql> USE menagerie Database changed
2. 创建表
mysql> CREATE TABLE pet1 (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
3. 向表中加载本地数据
mysql> LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet1;
4. 查看表中数据
mysql> SELECT * FROM pet;
结果图: