show create table mysql code example

Example 1: mysql show table structure

DESCRIBE table_name; # To show table structure...

Example 2: get create table query existing table mysql

SHOW CREATE TABLE tablename

Example 3: show table mysql

# First, select your database
USE yourDb;

# Then, simply
SHOW TABLES;

Example 4: mysql show create table

Copied mysql> SHOW CREATE TABLE t\G
*************************** 1. row ***************************
       Table: t
Create Table: CREATE TABLE `t` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `s` char(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

Tags:

Php Example