you are working on database and you have to add the multipe columns in a table then you need alter command. In this example i have told you how to create multiple columns in a table by using query.
Syntax:
ALTER TABLE [TABLE NANE]
ADD
[COL 1] DATATYLE,
[COL 2] DATATYLE,
[COL 3] DATATYLE,
[COL 4] DATATYLE,
[COL 5] DATATYLE
Example
Create a table with anem table1
CREATE TABLE TABLE1
(ID BIGINT IDENTITY,
FULLNAME NVARCHAR(100)
)
Now you have to add birthdaym status and gender columns in table1. now you have to write one line of code as given below.
ALTER TABLE TABLE1 ADD BIRTHDAY SMALLDATETIME, STATUS BIT, GENDER CHAR(2)
Author:
Aamir Hasan औथोर:
आमिर हसन أثر
أمير حسن .
4809be04-edd9-4a73-84ef-5337c159c0fb|1|5.0
ALL, SQL 2005 & 2008
sql, alter