mysql數(shù)據(jù)庫(kù)有什么用_查看MySQL數(shù)據(jù)庫(kù)的命令
本文關(guān)鍵詞:MySQL數(shù)據(jù)庫(kù),,由筆耕文化傳播整理發(fā)布。
查看MySQL數(shù)據(jù)庫(kù)是我們最常用的操作之一,下面對(duì)常用的查看MySQL數(shù)據(jù)庫(kù)的命令作了詳盡的闡述,如果您對(duì)查看MySQL數(shù)據(jù)庫(kù)方面感興趣的話,不妨一看。
進(jìn)入MySQL Command line client下
查看當(dāng)前使用的數(shù)據(jù)庫(kù):
mysql>select database();
mysql>status;
mysql>show tables;
mysql>show databases;//可以查看有哪些數(shù)據(jù)庫(kù),返回?cái)?shù)據(jù)庫(kù)名(databaseName)
mysql>use databaseName; //更換當(dāng)前使用的數(shù)據(jù)庫(kù)
mysql>show tables; //返回當(dāng)前數(shù)據(jù)庫(kù)下的所有表的名稱
或者也可以直接用以下命令
mysql>show tables from databaseName;//databaseName可以用show databases得來
mysql查看表結(jié)構(gòu)命令,如下:
desc 表名;
show columns from 表名;
或者
describe 表名;
show create table 表名;
或者
use information_schema
select * from columns where table_name='表名';
查看警告:
Rows matched: 1 Changed: 0 Warnings: 1
mysql> show warnings;
+---------+------+-------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------+
| Warning | 1265 | Data truncated for column 'name' at row 3 |
+---------+------+-------------------------------------------+
1 row in set
【編輯推薦】
顯示MYSQL表信息的方法
三種常用的MySQL建表語句
實(shí)例講解MySQL連接查詢
教您如何實(shí)現(xiàn)MySQL多表插入
MySQL修復(fù)表的兩個(gè)小技巧
【責(zé)任編輯:段燃 TEL:(010)68476606】
原文:查看MySQL數(shù)據(jù)庫(kù)的命令 返回?cái)?shù)據(jù)庫(kù)首頁
本文關(guān)鍵詞:MySQL數(shù)據(jù)庫(kù),由筆耕文化傳播整理發(fā)布。
本文編號(hào):144226
本文鏈接:http://sikaile.net/wenshubaike/xxkj/144226.html