MYSQL查看 table 表状态常用的命令
生活随笔
收集整理的這篇文章主要介紹了
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 是一個命令,不過是加了個參數而已,但是會返回額外的數據,有時候這些是比較有用的。 |
轉載于:https://blog.51cto.com/z515123/757981
總結
以上是生活随笔為你收集整理的MYSQL查看 table 表状态常用的命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ping tracert 联系区别
- 下一篇: XML格式对象序列化(2)