標籤:databases tables status mysql 資料庫
本文主要介紹mysql資料庫下show命令的主要用法,e良師益友網中有更加詳細的介紹,還有基礎相關的教學。
1、show tables或show tables from database_name; -- 顯示當前資料庫中所有表的名稱。
2、show databases; -- 顯示mysql中所有資料庫的名稱。
3、show columns from table_name from database_name; 或show columns from database_name.table_name; -- 顯示表中列名稱。
4、show grants for user_name; -- 顯示一個使用者的許可權,顯示結果類似於grant 命令。
5、show index from table_name; -- 顯示表的索引。
6、show status; -- 顯示一些系統特定資源的資訊,例如,正在啟動並執行線程數量。
7、show variables; -- 顯示系統變數的名稱和值。
8、show processlist; -- 顯示系統中正在啟動並執行所有進程,也就是當前正在執行的查詢。
9、show table status; -- 顯示當前使用或者指定的database中的每個表的資訊。資訊包括表類型和表的最新更新時間。
10、show privileges; -- 顯示伺服器所支援的不同許可權。
11、show create database database_name; -- 顯示create database 語句是否能夠建立指定的資料庫。
12、show create table table_name; -- 顯示create database 語句是否能夠建立指定的資料庫。
13、show engies; -- 顯示安裝以後可用的儲存引擎和預設引擎。
14、show innodb status; -- 顯示innoDB儲存引擎的狀態。
15、show logs; -- 顯示BDB儲存引擎的日誌。
16、show warnings; -- 顯示最後一個執行的語句所產生的錯誤、警告和通知。
17、show errors; -- 只顯示最後一個執行語句所產生的錯誤。
18、show [storage] engines; --顯示安裝後的可用儲存引擎和預設引擎。
本文出自 “語過添情” 部落格,請務必保留此出處http://yuguotianqing.blog.51cto.com/9292883/1572208
在MySql資料庫下show命令的主要用法