469,097 Members | 1,240 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,097 developers. It's quick & easy.

how to insert a new column between 2 column in a Table in MSSQL 2008?

147 100+
hi,

i have the following columns :

empno empname designation


In between empname and designation, i want to add new column location.

empno empname location designation.

Thanks in advance
Oct 27 '10 #1
3 2252
gpl
152 100+
use alter table / add column

The order of columns really shouldnt matter as you can place them in any order in your select query
Oct 27 '10 #2
santhanalakshmi
147 100+
Its k, fine. What do you told ? I want to know, whether its it possible to add like this or not in MS SQL 2008.

Possible to add columns in between the columns ?
Oct 27 '10 #3
ck9663
2,878 Expert 2GB
You can add a column, but not insert. In theory, relational databases does not care about the sequence of the column nor rows. At least in theory. This because you can specify the sequence of these columns, anyway....

If you really need to, create a table with that new column inserted, then populate it with your data coming from the original table.

Good Luck!!!

~~ CK
Oct 27 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Don Grover | last post: by
reply views Thread by crypto_solid via AccessMonster.com | last post: by
1 post views Thread by johnb41 | last post: by
reply views Thread by Toni Pohl | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.