MySQL常用命令总结(二)

imindn 15 0 PDF 2020-12-16 17:12:10

一.表管理语句 1.查看表 查看所有表 show tables; 查看表的概要 show table status\G; 查看某张表的概要 show table status like 't1' \G; 查看某张表的结构 desc t1; 查看创建表时的sql语句 show create table t1; 2.创建表 简单的创建 create table t2(id int(5),name varchar(20)); 添加主键约束 方法一 create table t3(id int(11) key,name varchar(45) not null comment 'student');

用户评论
请输入评论内容
评分:
暂无评论