首頁  >  文章  >  資料庫  >  mysql如何查詢表信息

mysql如何查詢表信息

王林
王林原創
2020-09-02 15:40:0124715瀏覽

mysql查詢表格資訊的方法:執行【select * from tables where table_schema = "db_name";】指令可以查看資料庫中所有資料表的資訊。

mysql如何查詢表信息

具體方法如下:

相關學習推薦:mysql教學(影片)

查詢一個裡面所有表格的資訊:

use information_scheam;
select * from tables where table_schema = "db_name";

查詢單一表格的資訊:

use information_scheam;
select * from tables where table_schema = "db_name" and table_name = "table_name1";

查詢一張表的所有欄位資訊:

use db_name;
show full columns from table_name1;
show full columns from table_name2;

本文來自php中文網mysql圖文教學頻道,歡迎學習!

以上是mysql如何查詢表信息的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn