
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
View CREATE TABLE Statement of Existing MySQL Table
We can see the create table statement of an existing table by using SHOW CREATE TABLE query.
Syntax
SHOW CREATE TABLE table_name;
Example
mysql> Show create table employee\G *************************** 1. row *************************** Table: employee Create Table: CREATE TABLE `employee` ( `Id` int(11) DEFAULT NULL, `Name` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec)
The query above gives the CREATE TABLE statement of ‘Employee’ table.
Advertisements