How To Change Column Ordinal Position in SQL Server 2005
using Query i.e I Want To Add Column at Particular Ordinal
Position in SQL Server 2005

Answers were Sorted based on User's Feedback



How To Change Column Ordinal Position in SQL Server 2005 using Query i.e I Want To Add Column at P..

Answer / bruhaspathy

You cannot add a column at that particular position that you wanted. Instead the workaround is that you add the column using the Alter Table command and then after the columns are created, you can go to object explorer and right click the table, select modify and then move the column to the desired column location you wanted.

Is This Answer Correct ?    6 Yes 0 No

How To Change Column Ordinal Position in SQL Server 2005 using Query i.e I Want To Add Column at P..

Answer / soorai ganesh

Hi Buddy,

Its not possible in SQLSERVER. If u want to add column in
particular ordinal position you have to drop the table and
have to create again the same table with your ordinal
choice. Incase if u have data in table, get them into one
temporary table and drop the table and recreate the table
again. then restore the data from temporary table..........

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More SQL Server Interview Questions

What are defaults? Is there a column to which a default can't be bound?

2 Answers   TCS,


How many index keys possible for a table

6 Answers  


Do comments need to go in a special place in sql server 2005?

0 Answers  


Hi, I have a table A which has four rows as follows Table A ------- empname salary ------- ------ A 1000 B 2000 C 3000 A 1000 B 2000 D 5000 I need the following output: empname salary ------- ------ A 1000 A 1000 B 2000 B 2000 Thanks in advance

10 Answers   IBM,


What is triggers in ms sql server?

0 Answers  






Does server sql treat char as a variable-length or fixed-length column?

0 Answers  


What factors you will consider calculating the storage requirement for that view?

0 Answers  


Can you use order by when defining a view?

0 Answers  


How can we improve performance by using SQL Server profiler?

0 Answers   QuestPond,


What are exact numeric data types in ms sql server?

0 Answers  


What is data source view or dsv? : sql server analysis services, ssas

0 Answers  


Following are some of the question related to below mentioned query? select e1.salary from employee3 e1 where 2= ( select count(distinct(e2.salary)) from employee3 e2 where e2.salary>=e1.salary ) 1) What the query returns? 2) How it works? - Detail explanation (what the sub query does, why it is (where 2=)....etc...Please?

5 Answers  


Categories