MYSQL查看 table 表状态惯用的命令
MYSQL查看 table 表状态常用的命令1.不必说,肯定是最常用的 desc(describe) 举例:mysqldesc t12.show ta
MYSQL查看 table 表状态常用的命令
1.不必说,肯定是最常用的 desc(describe)
举例:mysql>desc t1;
2.show table status这个感觉用起来语法很长啊,举例:mysql>show table status from database like 't%';将返回数据库 database 中以 t 开头的表的描述,如(database.t1, database.t2, database.ten)
3.show create table简单,举例:mysql>show create table test;将返回 test 表的创建sql 语句。
4.show columns?举例:mysql>show columns from table_name;眼熟哇,呵呵,默认返回的是和 desc 命令类似的结果。当然,show colums 还有like 等语法可以选择
5.show full columns其实和 show columns 是一个命令,不过是加了个参数而已,但是会返回额外的数据,有时候这些是比较有用的。单独列出来吧。