MySQL export database table contains data commands:
Mysqldump-uroot-proot ABC>/var/ABC. SQL;
(MySQL user name: Root Password root database: ABC export to:/var/ABC. SQL)
MySQL export database tables do not contain data commands:
Mysqldump-uroot-proot-d abc>/var/ABC. SQL;
MySQL import tables and data:
Use ABC; Source/var/ABC. SQL;
(Select the ABC database. The file to be imported is/var/ABC. SQL)
Add a MySQL field:
Alter table Table1 Add name varchar (10) Not NULL; // Add a Name field for table 1. The field type is varchar (10) alter table Table1 add Sid int not null auto_increment primary key // W add an auto increment gradually for table 1
MySQL modification command:
Alter table Table1 change name name1 varchar (20) not null; // Modify Table 1 to change the name field in table 1 to name1, and change the type to varchar (20) not empty.
Learning lies in accumulation!
@ Author: spring sky
Email: vipa1888@163.com
QQ: 840950105