Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ordering fields

Status
Not open for further replies.

yoines

IS-IT--Management
May 14, 2004
12
NO
I have a MS_SQL-table, where I need to add a column(/Fields). Are there any way to organize the order of the inserted fields?

(Example; I want the new fields to be located between 2 existing fields and not as the last fields).

Yngve
 
It does not matter what order the fields are in within a table. Adding the field between two fields that already exist does nothing for you.

Saying that, you can go into Enterprise Manager, drill down to the Databases. Then open the Database where the table resides. Then right click on the table and choose design.

In there you can add a field between 2 other fields.

Thanks

J. Kusch
 
When you follow the procedure that J has outlined if you click the Save and Script button you'll see what SQL is actually doing behind the sceans. It's making a new table with the new column where you requested it.

Then it's loading up all the data into the new table. Then it's dropping the old table and renameing the new table, readding all the index, and relationships along the way.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top