mysql如何查詢表信息

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教程頻道,歡迎學習!

以上就是

? 版權聲明
THE END
喜歡就支持一下吧
點贊15 分享