Alter table in SQL

Alter table means you are going to change the table structure to be careful when you going to change the table structure it may harm your existing data. Sometimes we have to change the structure of the existing table to form a new format or on request of the client or to manage data structure. Alter table is the most frequently doing job of the developer. for a beginner they don't know how to Alter table in SQL, they don't know the change the structure of the table. and they drop the table and recreate with the same structure. So here I show how to alter table with the wizard and with query


Right Click in the table which one you want to restructure or alter and click on the design


Alter table in SQL

Change the necessary column name give valid data type and check or uncheck the null allow or not

Alter table in SQL

Right click on the top active tab and click on save (table name) or use short cut key Ctrl +S combination

Alter table in SQL


Now you can find changes column name in the columns list

Alter table in SQL


You can also alter a table using query 
to alter table you can follow the following  syntax
Alter [Table Name] add [Column_name] [datatype]

eg. Alter table tbltest1 add isvalid int 

0 Comments