How to create table in Sql ?

CREATE TABLE  in sql...........
###########################################################

The SQL CREATE TABLE statement is used to create a new table.

CREATE TABLE Syntax

 

CREATE TABLE table_name(
   column1 datatype,
   column2 datatype,
   column3 datatype,
   .....
   columnN datatype,
   PRIMARY KEY( one or more columns )
   FOREIGN KEY ()
   UNIQUE()
   constraint constraint_name
 );


Example:


CREATE TABLE Persons
(
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
constraint pk_persons
primary key (PersonID),
constraint fk_persons
foreign key primary_key_of_another_table
);

মন্তব্যসমূহ

এই ব্লগটি থেকে জনপ্রিয় পোস্টগুলি

How to install Apex

How to Lock a folder Useing bat file || how can folder lock in windows 7...