Mysql record copy Import and Export copy record lower case-insensitive function password encryption function www.2cto.com create table employee> create table employee (id int, name char (10), agi int, sex enum ('M', 'F'), department char (10);> insert into employee values (23, 'john', 27, 'M ', 'engi'), (31, 'sue ', 31, 'F', 'fiance'), (113, 'David', 26, 'M ', 'admin');> select * from employee; + ------ + ------- + ------ + ------------ + | id | name | agi | sex | department | + ------ + ------- + ------ + ------------ + | 23 | john | 27 | M | Engi | 31 | Sue | 31 | F | Fiance | 113 | David | 26 | M | Admin | + ------ + ------- + ------ + ------------ + create table user> create table user (uid int primary key auto_increment, uname char (10), upass char (10); copy record> insert into user (uname, upass) select lower (name), password (lower (name )) from employee;> select * from user; + ----- + ------- + ------------ + | uid | uname | upass | + ----- + ------- + ------------ + | 1 | john | * DACDE7F57 | 2 | sue | * 934B89788 | 3 | david | * 8201E0C1B | + ----- + ------- + ------------ + when copying a record, you can add the where condition> insert into user (uname, upass) select (name), password (name) from employee where department = 'fiance ';> select * from user; + ----- + ------- + ------------ + | uid | uname | upass | + ----- + ------- + ------------ + | 1 | john | * DACDE7F57 | 2 | sue | * 934B89788 | 3 | david | * 8201E0C1B | 4 | Sue | * 287E48EAA | + ----- + ------- + ------------ + ------------------------ www.2cto.com import data load data infile... syntax: load data infile' absolute path of the file 'into table name fields terminated by 'field delimiter 'Lines terminated by' record delimiter'; example:> load data infile '/tmp/a.txt' into table t20 fields terminated by ': 'Lines terminated by' \ n'; export data select... into outfile... syntax: select field from table name into outfile' file absolute path 'fields terminated by' Field Segmentation server 'Lines terminated by' record delimiters '; example:> select * from t20 into outfile '/tmp/B .txt' fields terminated by ': 'Lines terminated by' \ n ';