mysql 檢視表結構

2021-09-02 09:32:11 字數 524 閱讀 4091

連線到mysql

d:\mysql-5.6.10-winx64\bin\mysql -h192.168.1.1 -u root -proot

-hip

-u使用者名稱

-p密碼

[url=""]檢視表結構[/url]

[quote]

--檢視表結構資訊(本人相看,得到相同的結果)

1.desc 表名;

2.show columns from 表名;

3.describe 表名;

--顯示如何建立乙個表

show create table 表名;

use information_schema

select * from columns where table_name='表名';

順便記下:

show databases;

use 資料庫名;

show tables;

[/quote]

mysql檢視表結構索引 mysql檢視表結構命令

mysql檢視表結構命令,如下 desc 表名 show columns from 表名 describe 表名 show create table 表名 use information schema select from columns where table name 表名 順便記下 show...

Mysql 檢視表結構

i 簡單描述表結構,字段型別 desc tabl name 顯示表結構,字段型別,主鍵,是否為空等屬性,但不顯示外來鍵。ii 查詢表中列的注釋資訊 select from information schema.columns where table schema db 表所在資料庫 and tabl...

mysql檢視表結構命令

mysql檢視表結構命令,如下 desc 表名 show columns from 表名 describe 表名 show create table 表名 use information schema select from columns where table name 表名 順便記下 show...