- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What kind of information is displayed by MySQL DESCRIBE statement?
The DESCRIBE statement gives information about MySQL table’s structure.
Example
Consider the constructing of the following table name ‘Employee’ with Create Table statement as follows −
mysql> Create table Employee(ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Name Varchar(20)); Query OK, 0 rows affected (0.20 sec)
Now with the help of ‘DESCRIBE Employee‘ statement, we can get the information about the employee table.
mysql> Describe Employee; +-------+-------------+------+-----+---------+------------------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+------------------+ | ID | int(11) | NO | PRI | NULL | auto_increment | | Name | varchar(20) | YES | | NULL | | +-------+-------------+------+-----+---------+------------------+ 2 rows in set (0.11 sec)
The above description tells us about the name of the column, its data type, whether it can have NULL values or not, by default what kind of values it can store, the key constraint on it, and any other extra information about it like auto_increment.
- Related Articles
- How can I get the information about a particular column of a table by MySQL DESCRIBE statement?
- How can I get the information about a particular column of a table by MySQL EXPLAIN statement? EXPLAIN statement?
- What kind of output is produced by UNIX_TIMESTAMP() function?
- What kind of motion is shown by an ant ?
- What kind of motion is shown by a snail?
- What kind of change is shown by tearing of paper?
- What kind of output is returned by MySQL scalar subquery? What are the restrictions on using it with MySQL query?
- How we can get more information about columns of a table than the information we got by DESCRIBE, EXPLAIN and SHOW COLUMNS MySQL statements?
- What kind of string comparison, case-sensitive or not, can be performed by MySQL?
- What is MySQL LOAD DATA statement?
- What is the use of MySQL IGNORE INSERT statement?
- What are the synonym statements of MySQL DESCRIBE?
- What is the use of FLUSH PRIVILEGES statement in MySQL?
- What is “where 1=1” statement in MySQL?
- MySQL order by field using CASE Statement

Advertisements