programplug Logo




ALTER TABLE IN SQL



Alter table is used to add, modify or delete coloumns in an existing table. It is also used to rename a table.
You can also set command drop and add various constraints on an existing table.

This command contain four sub command:

  1. Alter add
  2. Alter modify
  3. Alter rename
  4. Alter drop

ALTER TABLE To Add Column

Syntax:

ALTER TABLE table_name ADD 
(
column 1 datatype(size),
column 2 datatype(size),
column 3 datatype(size),

.........
);

ALTER TABLE To modify Column

Syntax:

 ALTER TABLE table_name MODIFY 
(
column 1 datatype(size),
column 2 datatype(size),
column 3 datatype(size),
.........
);
	

ALTER TABLE To RENAME Column

Syntax:
ALTER TABLE table_name RENAME COLUMN previous_column_name TO new_column_name;
	

ALTER TABLE To RENAME Column

Syntax:
ALTER TABLE table_name RENAME COLUMN previous_column_name TO new_column_name;
	

ALTER TABLE To DROP Column

Syntax:
ALTER TABLE table_name DROP column_name;
	





Our Services

Developing Cheapest Websites
Offer Digital Marketing
Provide College Projects
Attractive Website Developing
Summer Training,Industrial Training
SCO,SMO

Contact Us

Dehradun Uttarakhand India
www.programplug.com
info@programplug.com
08534019974
Designed By : Mridul Gupta

Other Link

About Us

Contact Us

Disclaimer

Privacy Policy