472,111 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,111 software developers and data experts.

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 2371
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.