Mysql create tables

Use a CREATE TABLE statement to specify the layout of your table

Syntax:
SQL syntax to create a MySQL table:
CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
column_name3 data_type(size),
...
);

Examples :

Create table student (Code int,Name varchar(100),Sub1 varchar(100),Sub2 varchar(100),Sub3 varchar(100))


Include Primary Key

Create table student1 (Code int,Name varchar(100),Sub1 varchar(100),Sub2 varchar(100),Sub3 varchar(100),
primary key(Code))

Post a Comment

0 Comments