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 adds an auto-incrementing 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 the type to varchar (20 ).
Learning lies in accumulation!
@ Author: spring sky
Email: vipa1888@163.com
QQ: 840950105