CREATE Statement

The CREATE statement is used for creating a table in database.

Syntax:
CREATE TABLE Table_name (coloumn_1 datatype, coloumn_2 datatype,......coloumn_n datatype);

Example:
CREATE TABLE Student_Data (name varchar(40), Roll_No int, Address varchar(50));

Question:
Create a table with name BANK and have the following fields
Name
Address
Account_Number
Balance_Amount,
After creating table, display the structure of that table. ?

Answer:

 CREATE TABLE BANK (Name varchar(20), Address varchar(50), Account_Number int,         Balance_Amount int);
execute the above query in MySQL is shown bellow


In order to view the structure of the table use the following query.

DESCRIBE Student;

It is note that SQL is not case sensitive.