Alter table add column SQL Server
In this tutorial, I am going to tell, how you can add a column in the existing table. To add a new column in the table we use alter table tablename add the statement.
First Step 1:
CREATE TABLE employee (
emp_code varchar(100) not null
);
alter table employee add address varchar(50) not null
alter table employee add
empid bigint not
null identity primary key
alter table employee add status char(1) null
In this tutorial, you see how you can add a column in the existing table.
Note:
Add a column in the table doesn't affect the table
Also Read
Post a Comment