February 11, 2011 at 12:41 pm
I use code to add new column:
alter table order
add [city] varchar(50)
How to move new column next to column [state]?
February 11, 2011 at 1:42 pm
First of all why do you want to move the column [City] next to the column [state]?
The order in which you select items is the order in which they are displayed. For example:
SELECT [Name], [StreetAddress],[City],[State] is the way they will be returned to the calling routine. So their would be no need to rearrange your table definition.
If you elaborate on the need for this rearrangement of columns maybe we could be of more assistance.
February 11, 2011 at 3:20 pm
I agree with bitbucket, if you can explain why, it may help us determine what you are trying to accomplish.
When you created the column, had you used SSMS you could have right-clicked on Columns and entered all of the column information there. Before exiting, just click and drag the column where you wish it to be.
Chris Powell
George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply