[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 708
  • Last Modified:

Change column order in SQL Server 7

Is there an easy way to change the column order in a SQL Server 7.0 table. The column has data in it. The help mentions dragging and dropping in design table mode but I couldn' get it to work. If the solution is with Alter Table could you please provide an example.

Thank yoy, Tom.
0
boardtc
Asked:
boardtc
1 Solution
 
gindeCommented:
I don't know, if SQL Server 7.0 has any easier method.  But in SQl Server 6.5 I would do it by copying data into temporary table and bringing it back. For eaxmple, to alter table A
select * INTO back_tableA from tableA
then do recreate original table with correct order and move data back.

You might not like this method, but it works.

0
 
Gustavo Perez BuenrostroCommented:
tomcorcoran,
Could you be more specific?
0
 
boardtcAuthor Commented:
Ginde, thanks, you are right I was hoping for a more elegant solution. gpbuenrostro, I can't really put it any simpler than that, I am looking to reorder a column in an SQL Server 7.0 table which has existing data in the column. What don't you follow? Thanks. Tom.
0
 
allwaysCommented:
Go to Design.
Mark the row you like to move.
then Just cut it out.
Go to the new place. Paste.
Works for me.

Allways
0
 
boardtcAuthor Commented:
Great thanks, that was obvious, should have tried it. Note, there is no cut and paste options, do Shift+DEl and Shift+INS. Cheers, Tom.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now