Hi siddangoud,
ALTER TABLE by default adds new columns at the end of the table in SQL Server.
You can't add the column at specified location.
The best way is to add the column at the end of the table.
Write the query in the order you want to insert or select record.
Example:
-- Create Table.
CREATE TABLE Customers
(
CustomerId INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
Name VARCHAR(100) NULL
)
-- Add Cloumn at end position
ALTER TABLE Customers
ADD Country VARCHAR(50)
-- Specify the column name order in the insert query.
INSERT INTO Customers (Country,Name) VALUES ('India','Dharmendra')
-- Specify the column order in the select query.
SELECT CustomerId,Country,Name FROM Customers