mysql查詢表信息的方法:執行【select * from tables where table_schema = “db_name”;】命令可以查看數據庫中所有表的信息。
具體方法如下:
相關學習推薦: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;
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦