Create table in MySQL

Create table in MySQL

To create a table in mysql we use the Create Table statement.

Syntax:

CREATE TABLE table_name (column_name data_type constraints,...);

CREATE TABLE yamicode
(
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    email VARCHAR(255) UNIQUE,
    name VARCHAR(255) NOT NULL,
    number_of_posts INT DEFAULT 0
)