MySQL下show的主要用法

來源:互聯網
上載者:User

a. show tables或show tables from database_name; — 顯示當前MySQL資料庫中所有表的名稱。

b. show databases; — 顯示MySQL中所有資料庫的名稱。

c. show columns from table_name from database_name; 或show columns from database_name.table_name; — 顯示表中列名稱。

d. show grants for user_name; — 顯示一個使用者的許可權,顯示結果類似於grant 命令。

e. show index from table_name; — 顯示表的索引。

f. show status; — 顯示一些系統特定資源的資訊,例如,正在啟動並執行線程數量。

g. show variables; — 顯示系統變數的名稱和值。

h. show processlist; — 顯示系統中正在啟動並執行所有進程,也就是當前正在執行的查詢。

i. show table status; — 顯示當前使用或者指定的database中的每個表的資訊。資訊包括表類型和表的最新更新時間。

j. show privileges; — 顯示伺服器所支援的不同許可權。

k. show create database database_name; — 顯示create database 語句是否能夠建立指定的資料庫。

l. show create table table_name; — 顯示create database 語句是否能夠建立指定的資料庫。

m. show engines; — 顯示安裝以後可用的儲存引擎和預設引擎。

n. show innodb status; — 顯示innoDB儲存引擎的狀態。

o. show logs; — 顯示BDB儲存引擎的日誌。

p. show warnings; — 顯示最後一個執行的語句所產生的錯誤、警告和通知。

q. show errors; — 只顯示最後一個執行語句所產生的錯誤。

r. show [s×age] engines; –顯示安裝後的可用儲存引擎和預設引擎。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.