mysql how to create tables code example
Example 1: create table in mysql
CREATE TABLE user (
userId INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(100),
password VARCHAR(100)
) ENGINE=InnoDB;
Example 2: create table mysql query
create table tutorials_tbl(
tutorial_id INT NOT NULL AUTO_INCREMENT,
tutorial_title VARCHAR(100) NOT NULL,
tutorial_author VARCHAR(40) NOT NULL,
submission_date DATE,
PRIMARY KEY ( tutorial_id )
);
Example 3: how to create a table in mysql
CREATE TABLE `test_table`
(
id INT(10) PRIMARY KEY,
username VARCHAR(50) NOT NULL
);
Example 4: mysql create table
CREATE TABLE nom_de_la_table
(
colonne1 type_donnees,
colonne2 type_donnees,
colonne3 type_donnees,
colonne4 type_donnees
)