mysql 查看表定義


兩種顯示表定義

mysql> desc sys_role;
+-----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| ROLE_ID | varchar(100) | NO | PRI | NULL | |
| ROLE_NAME | varchar(100) | YES | | NULL | |
| RIGHTS | varchar(255) | YES | | NULL | |
| PARENT_ID | varchar(100) | YES | | NULL | |
| ADD_QX | varchar(255) | YES | | NULL | |
| DEL_QX | varchar(255) | YES | | NULL | |
| EDIT_QX | varchar(255) | YES | | NULL | |
| CHA_QX | varchar(255) | YES | | NULL | |
| QX_ID | varchar(100) | YES | | NULL | |
+-----------+--------------+------+-----+---------+-------+
9 rows in set (0.00 sec)

++++++++++++++++++++++++++++分割線++++++++++++++++++++++++++++++

mysql> show create table sys_role \G;
*************************** 1. row ***************************
Table: sys_role
Create Table: CREATE TABLE `sys_role` (
`ROLE_ID` varchar(100) NOT NULL,
`ROLE_NAME` varchar(100) DEFAULT NULL,
`RIGHTS` varchar(255) DEFAULT NULL,
`PARENT_ID` varchar(100) DEFAULT NULL,
`ADD_QX` varchar(255) DEFAULT NULL,
`DEL_QX` varchar(255) DEFAULT NULL,
`EDIT_QX` varchar(255) DEFAULT NULL,
`CHA_QX` varchar(255) DEFAULT NULL,
`QX_ID` varchar(100) DEFAULT NULL,
PRIMARY KEY (`ROLE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
1 row in set (0.02 sec)

ERROR:
No query specified

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM