Sunday, November 24, 2013

how to create table in sql server


Create table

The create table key word is used to crate a table in sql server database .
Sql server  create table syntax

CREATE TABLE table name
(
column name1  data type(size),  
column name2  data type(size),  
column name3  data type(size),
)

Example

create table person
(
      p_id  int,
      firstname varchar(50),
      lastname varchar(50),
      address varchar(70),
      city  char(20)
)

Drop table

The drop  table key word is used to delete a table in sql server database .
Sql server  drop  table syntax
Drop table table name
Example
Drop table employee

No comments:

Post a Comment

sql server index

sql index An index is an internal table structure that sql server uses to provide quick access to rows of a table based on the values...