create table mysql exmaple code example
Example 1: 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 2: creating table in MySQL
#Assuming that there is a database called MyDatabase
#creates a table called TableName, with columns Name, Age, and Class
Use MyDatabase;
create table TableName(
No. int primary key,
Name varchar(50),
Age int,
Class varchar(15));