新聞中心
怎么獲得mysql數(shù)據(jù)庫中某個表的名稱
方法如下,以oracle為例:
十載專注成都網(wǎng)站制作,企業(yè)網(wǎng)站制作,個人網(wǎng)站制作服務(wù),為大家分享網(wǎng)站制作知識、方案,網(wǎng)站設(shè)計流程、步驟,成功服務(wù)上千家企業(yè)。為您提供網(wǎng)站建設(shè),網(wǎng)站制作,網(wǎng)頁設(shè)計及定制高端網(wǎng)站建設(shè)服務(wù),專注于企業(yè)網(wǎng)站制作,高端網(wǎng)頁制作,對成都廣告制作等多個領(lǐng)域,擁有多年的網(wǎng)站運維經(jīng)驗。
select * from all_tables WHERE owner='SCOTT' ;或者
SELECT * FROM DBA_TABLES WHERE OWNER='SCOTT';
數(shù)據(jù)字典視圖
表和列
DBA_TABLES、ALL_TABLES和USER_TABLES顯示了有關(guān)數(shù)據(jù)庫表的一般信息。
DBA_TAB_COLUMNS、ALL_TAB_COLUMNS和USER_TAB_COLUMNS顯示了每個數(shù)據(jù)庫表的列的信息。
注意:DBA_OBJECTS、ALL_OBJECTS和USER_OBJECTS顯示了模式對象的信息,包括表。
怎樣獲取mysql數(shù)據(jù)庫里所有表的名字
用sql獲取數(shù)據(jù)庫中所有的表名的方法:
1、oracle下:select table_name from all_tables;
2、MySQL下:select table_name from information_schema.tables where table_schema='csdb' and table_type='base table';
3、sql server下:select name from sys.tables go
navicat for mysql怎么查詢表名
在桌面找到navicat for mysql的圖標(biāo),點擊并打開。
選擇需要進(jìn)行查詢的數(shù)據(jù)庫的鏈接地址,如下圖所示:
在數(shù)據(jù)庫鏈接地址中,找到需要查詢的數(shù)據(jù)庫,雙擊將其數(shù)據(jù)庫打開,可以看到數(shù)據(jù)庫的顏色會由灰色變成彩色。如下圖:
點擊上方的‘查詢’功能,然后點擊箭頭所指的‘創(chuàng)建查詢’功能,如下圖:
點擊‘創(chuàng)建查詢’后,會彈出一個對話框,改對話框就是輸入查詢語句進(jìn)行查詢的對話框,在這里可以輸入查詢的sql語句,對表進(jìn)行查詢。如圖:
輸入查詢語句完成后,點擊左上角的運行按鈕,根據(jù)輸入的sql語句進(jìn)行查詢。
查詢結(jié)果以列表的形式進(jìn)行展現(xiàn),如下圖:
查詢mysql數(shù)據(jù)庫中所有表名
查找所有表的語句
select table_name
from information_schema.tables
where table_schema='當(dāng)前數(shù)據(jù)庫'
mysql ?use mysql
Database changed
mysql show tables;
+---------------------------+
| Tables_in_mysql ? ? ? ? ? |
+---------------------------+
| columns_priv ? ? ? ? ? ? ?|
| db ? ? ? ? ? ? ? ? ? ? ? ?|
| event ? ? ? ? ? ? ? ? ? ? |
| func ? ? ? ? ? ? ? ? ? ? ?|
| general_log ? ? ? ? ? ? ? |
| help_category ? ? ? ? ? ? |
| help_keyword ? ? ? ? ? ? ?|
| help_relation ? ? ? ? ? ? |
| help_topic ? ? ? ? ? ? ? ?|
| innodb_index_stats ? ? ? ?|
| innodb_table_stats ? ? ? ?|
| ndb_binlog_index ? ? ? ? ?|
| plugin ? ? ? ? ? ? ? ? ? ?|
| proc ? ? ? ? ? ? ? ? ? ? ?|
| procs_priv ? ? ? ? ? ? ? ?|
| proxies_priv ? ? ? ? ? ? ?|
| servers ? ? ? ? ? ? ? ? ? |
| slave_master_info ? ? ? ? |
| slave_relay_log_info ? ? ?|
| slave_worker_info ? ? ? ? |
| slow_log ? ? ? ? ? ? ? ? ?|
| tables_priv ? ? ? ? ? ? ? |
| time_zone ? ? ? ? ? ? ? ? |
| time_zone_leap_second ? ? |
| time_zone_name ? ? ? ? ? ?|
| time_zone_transition ? ? ?|
| time_zone_transition_type |
| user ? ? ? ? ? ? ? ? ? ? ?|
+---------------------------+
28 rows in set (0.05 sec)
show tables即為顯示當(dāng)前數(shù)據(jù)庫中所有的表。
根據(jù)具體問題類型,進(jìn)行步驟拆解/原因原理分析/內(nèi)容拓展等。
具體步驟如下:/導(dǎo)致這種情況的原因主要是??
新聞名稱:mysql怎么搜索表名 mysql查表名和字段名
URL地址:http://fisionsoft.com.cn/article/doceohh.html