mysql數(shù)據(jù)庫學習1,獲取原數(shù)據(jù)_MySQL
來源:懂視網(wǎng)
責編:小采
時間:2020-11-09 18:39:26
mysql數(shù)據(jù)庫學習1,獲取原數(shù)據(jù)_MySQL
mysql數(shù)據(jù)庫學習1,獲取原數(shù)據(jù)_MySQL:bitsCN.com show databasesshow tablesinformation_schemashow tables 語句的輸出不包含temporary表 查看服務器所有數(shù)據(jù)庫>show databases查看給定數(shù)據(jù)庫的 create database語句>show create database db_name查
導讀mysql數(shù)據(jù)庫學習1,獲取原數(shù)據(jù)_MySQL:bitsCN.com show databasesshow tablesinformation_schemashow tables 語句的輸出不包含temporary表 查看服務器所有數(shù)據(jù)庫>show databases查看給定數(shù)據(jù)庫的 create database語句>show create database db_name查

bitsCN.com
show databasesshow tablesinformation_schemashow tables 語句的輸出不包含temporary表 查看服務器所有數(shù)據(jù)庫>show databases查看給定數(shù)據(jù)庫的 create database語句>show create database db_name查看默認數(shù)據(jù)庫的數(shù)據(jù)表或給定數(shù)據(jù)庫的數(shù)據(jù)表>show tables>show tables from db_name查看給定數(shù)據(jù)庫的數(shù)據(jù)表的create table語句>show create table tbl_name查看數(shù)據(jù)表里的列或索引信息>show columns from tbl_name>show index from tbl_name下面的語句和show columns from tbl_name語句相同>describe tbl_name>explain tbl_name查看默認數(shù)據(jù)庫或給定數(shù)據(jù)庫里數(shù)據(jù)表的描述性信息>show table status>show table status from db_name給show語句的輸出限定一個范圍,也可以將支持like的語句改成where,where語句不改變列數(shù),只改變輸出的行數(shù),如果數(shù)據(jù)列中的名字是保留字必須使用反引號(`)括起來。>show columns from tbl_name like '%s'>show columns from tbl_name like '_s' >show columns from tbl_name where `key`='pri'
mysqlshow命令
mysqldump命令 服務器所管理的數(shù)據(jù)庫mysqlshow(如果顯示拒絕,則要提供主機,用戶名和密碼如下所示,如果主機更改過默認端口還必須提供端口大寫P -P)>mysqlshow mysql -h localhost -u root -p列出給定的數(shù)據(jù)庫的數(shù)據(jù)表>mysqlshow db_name查看給定數(shù)據(jù)表里的數(shù)據(jù)列信息>mysqlshow db_name tbl_name查看給定數(shù)據(jù)表里的索引信息>mysqlshow --keys db_name tbl_name查看給定數(shù)據(jù)庫里的數(shù)據(jù)表的描述信息>mysqlshow --status db_name 列出給定數(shù)據(jù)庫中數(shù)據(jù)表的結(jié)構(gòu)信息(如果不加--no-data參數(shù)將同時列出所有表中的數(shù)據(jù))>mysqldump --no-data db_name [tbl_name] -u root -p|morebitsCN.com
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
mysql數(shù)據(jù)庫學習1,獲取原數(shù)據(jù)_MySQL
mysql數(shù)據(jù)庫學習1,獲取原數(shù)據(jù)_MySQL:bitsCN.com show databasesshow tablesinformation_schemashow tables 語句的輸出不包含temporary表 查看服務器所有數(shù)據(jù)庫>show databases查看給定數(shù)據(jù)庫的 create database語句>show create database db_name查