TSQL - Alter Table Add Multiple Columns SQL Server

Sometime we have to add multiple columns to the already existing table.  Instead of adding one column at a time we can add multiple columns in one statement.

Here is example how to Add Multiple Columns to already existing table.

USE TEST1
GO

--Create Table
CREATE TABLE dbo.MyTestTable( ID INT)
--Add Multiple columns in one statement
ALTER TABLE dbo.MYTestTable
ADD
Name VARCHAR(100) NOT NULL,
ADDRESS VARCHAR(100) NOT NULL,
AGE INT NOT NULL,
PhoneNumber VARCHAR(12)


Video Demo
How to Add Multiple Columns to SQL Server Table in Single SQL Statement

9 comments:

  1. Footstools couple up as square tables and are exceptionally well known with sectionals.ELECTROLUX APPLIANCE REPAIR & SERVICE IN SANTA BARBARA

    ReplyDelete
  2. Even in the wake of investing in a ton of energy, clients in some cases moan in disappointment when the conveyance man at last contacts them with furniture in the wake of hanging tight for quite a long time. Daniel

    ReplyDelete