31.1 inforMATION_SCHEMA aCcess syntax
select table_name from informatin_schema.tables?
where table_schema='information_schema';
查詢表
?select column_name from information_schema.columns
where table_schema='information_schema'
and table_name='character_sets';
31.2 information_schema vers show
1.information_schema相比show的優勢:
1.information_schema是標準SQL的特征,然而Showm是一個MySQL-specific語句
2.使用Information——schema,你總說能夠使用SELECT語法獲取元數據,無需考慮信息的類型。
3.使用select和information_schema,你可以由完整的靈活選擇獲取什么。
4.因為在Information_schema的信息能夠獲取使用靈活的select,你能夠使用joins,unions和子查詢
5.可以使用create table....selcet or insert ...select,這INFORMATION_SCHEMA的內容能夠獲取和存儲到其他的表使用。
show的優勢:
1.show 是一個表可以使用隨MySQL的發布
2.show總是更加準確的
31.3 INFORMATION_SCHEMA的限制
show varivles
show status
show engiens
show processlist
show master status 和 show slave status提供關副本服務器的信息。
總結
以上是生活随笔為你收集整理的31.1 inforMATION_SCHEMA aCcess syntax的全部內容,希望文章能夠幫你解決所遇到的問題。