修改表的名称
mysql>RENAME TABLE study TO study_new ;
或者
mysql>ALTER TABLE study_new RENAME TO study;
显示字段信息
SHOW COLUMNS FROM study或者DESCRIBE study
插入数据
mysql> insert into study (username,class,sex)VALUES("小王",1,"男"),("小四",2,"女");
查询数据(使concat函数拼接数据)
mysql> SELECT username,CONCAT(class,"班"),sex FROM study;
删除数据
mysql>DELETE FROM study WHERE id=1;
删除数据表
DROP TABLE study;
删除数据库
mysql> DROP DATABASE lesson;