分类: Mysql/postgreSQL
2019-05-26 19:39:10
查看所有表 |
show tables |
查看表结构 |
desc 表名/视图名 |
查看建表的过程 |
show create table 表名 |
查看建视图过程 |
show create view 视图名 |
删除表 |
drop table 表名 |
删除视图 |
drop view 视图名 |
查看表详细信息 |
show table status(\G 加上它更加清晰) |
查看某张表详细信息 |
show table status where 条件 |
改表名 |
rename table 旧表名 to 新表名 |
清除表数据 |
truncate 表名 |