標籤:soft grant images family mit 資料 limit div weight
//查詢所有表的所有欄位:
select * from information_schema.columns where table_name=‘sys_users‘
效果:
//查詢指定表的所有欄位:
select * from information_schema.columns where table_name=‘sys_users‘ and TABLE_SCHEMA=‘taoke‘
效果:
//查詢指定表的所有欄位的指定類型,注釋:
查詢所有含有此欄位名的表:
SELECT * FROM information_schema.columns WHERE column_name=‘name‘;
查詢指定資料庫含有此欄位名的表:
SELECT * FROM information_schema.columns WHERE column_name=‘name‘ and TABLE_SCHEMA=‘wljdb‘;
查詢指定表資料庫指定表的所有欄位
select column_name from information_schema.COLUMNS where table_name=‘sys_users‘ and TABLE_SCHEMA=‘taoke‘
查詢指定表資料庫指定表的第二個欄位名:
select column_name from information_schema.COLUMNS where table_name=‘sys_users‘ and TABLE_SCHEMA=‘taoke‘ LIMIT 1,1
以上,舉一反三
---------------------完畢----------------------------
MySQL許可權 grant
http://www.cnblogs.com/Richardzhu/p/3318595.html
MYSQL 資料庫名、表名、欄位名查詢