- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- 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 are the synonym statements of MySQL DESCRIBE?
Followings are the synonyms statements of MySQL DESCRIBE i.e. the statements with the help of which we can get the same kind of information/structure of the table as we get from DESCRIBE −
EXPLAIN Statement
EXPLAIN is the synonym of the DESCRIBE statement. Its syntax is also similar to the DESCRIBE statement. Consider the following example −
mysql> Explain 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)
We can see this statement also gives the same output as we got with DESCRIBE statement.
SHOW COLUMNS Statement
This statement is also a synonym of DESCRIBE and hence of statement EXPLAIN too. Its syntax is a bit different from DESCRIBE and EXPLAIN as follows −
Syntax
SHOW COLUMNS From Table_name;
Example
In the example given below, we can see that the output is the same as we have received the output from DESCRIBE and EXPLAIN statement
mysql> Show columns from 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)
Advertisements