SQL- Create Table | Corona Updates

Create Table



In SQL, CREATE TABLE statement is used to create a new table in a database.

Syntax :-


CREATE TABLE  table_name


                        (


                       column1 datatype,  


                        column2 datatype,  


                         column3 datatype


                          );


Example : I will show how to Create table in database.

Query :  


CREATE TABLE my_tb 


                   ( 


                  Name varchar(50),


                  Roll int(4),


                  address varchar(40)  


                  );    






Output :                                                                                                                                      

Table is created and you can used  DESC command and see table.

Syntax :
desc my_tb;
Output :

Post a Comment

0 Comments