Mysql命令学习
1. CREATE DATABASE dbname;
2. DROP DATABASE dbname;
3. GRANT ALL PRIVILEGES ON dbname.* TO 'username'@'localhost' IDENTIFIED BY 'usercode';
4. USE dbname;
5. CREATE TABLE tablename (name type width isempty primarykey auto_increment default);
6. DROP TABLE tablename;
7. INSERT INTO tablename [( <name1>[,..<namen > ])] Values ( value1 )[, ( value2 )]
8. DELETE FROM tablename where id =1;
9. UPDATE tablename set name= newvalue WHERE conditon;
10. auto_increment: 自动编号,从最后一行数据开始,int类型加1;
11. default '数据' 在使用INSERT命令时,如果需要使用default值时,必须保证键值对应。