Home » mysql » Show mysql create table query

Show mysql create table query

To see created table structure show create table command is used

Syntax

Example

Result

To avoid showing leading and trailing dots we use \G with command syntax is as below

Example

Result
*************************** 1. row ***************************
Table: student
Create Table: CREATE TABLE student (
id int(11) DEFAULT NULL,
first_name varchar(30) DEFAULT NULL,
last_name varchar(30) DEFAULT NULL,
semester varchar(20) DEFAULT NULL,
address varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

Please follow and like us:
error