Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > How do you insert a new column to a specifc place in the table?


Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2001, 01:51 PM
jamesmuglia
Guest
 
Posts: n/a
Default How do you insert a new column to a specifc place in the table?


Greetings, can anyone please tell me how to insert a new column at a given location in the table. Say that there are 10 fields in the table and we want the new column we're adding to show up as the fourth column in the table. I know we insert a new column by saying

ALTER TABLE Table
ADD NewColumn
NULL

but how do we specify which column number that we would like it to be?
Thanks so much!
Jim


Reply With Quote
  #2  
Old 06-28-2001, 02:17 PM
KesleyK's Avatar
KesleyK KesleyK is offline
Senior Contributor

Retired Moderator
* Expert *
 
Join Date: Jun 2001
Location: Idaho, missing Dallas
Posts: 965
Default Re: How do you insert a new column to a specifc place in the table?

I don't think you can insert a new field at a specific index in a table. However, you may be able to move it once you have it added.

If it comes down to it, you could create a new table with the columns in the order you want one at a time. Delete the old table and rename the new one. *SHRUG* Just an option...

______
Cheers!
__________________
We shall persevere.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->