Description : CREATE TABLE statement use for create a table in your existsing SQL database
Syntax :
CREATE TABLE YourTableName (
TableColumn1 DataType,
TableColumn2 DataType,
TableColumn3 DataType,
)
Example :
CREATE TABLE Employee (
EmployeeID Int,
EmployeeName Varchar(50),
City Varchar(50),
PhoneNo Varchar(50)
)
Syntax : Syntax for how to create table using another table of database
CREATE TABLE YourTableName AS
SELECT Column1,
Column2 FROM CreatedTableName
Syntax :
CREATE TABLE YourTableName (
TableColumn1 DataType,
TableColumn2 DataType,
TableColumn3 DataType,
)
Example :
CREATE TABLE Employee (
EmployeeID Int,
EmployeeName Varchar(50),
City Varchar(50),
PhoneNo Varchar(50)
)
Syntax : Syntax for how to create table using another table of database
CREATE TABLE YourTableName AS
SELECT Column1,
Column2 FROM CreatedTableName
No comments:
Post a Comment