|
-
Jun 21st, 2007, 12:52 AM
#1
Thread Starter
Member
Insert SQL
hi all,
i have an insert problem
for e.g if i haf a table in this form
A|b|C|D
i would like to insert a new column field in betweeen b and C
and my new table will look like
A|b|c|e|d
is that possible?
are there any reference in this area? pls advise me thnx!
-
Jun 21st, 2007, 01:12 AM
#2
Re: Insert SQL
This has nothing to do with VB.NET. Questions relating to changing the schema of a database belong in the Database Development forum.
To alter the schema of a table you execute an ALTER TABLE statement. Just like any SQL statement this can be done by calling the ExecuteNonQuery method of a Command object, but that's as far as VB's involvement goes. You should consult an SQL reference to get the appropriate syntax. There's a standard but each database may vary that a little. Microsoft provide documentation for SQL Server and Access SQL and other database vendors will also provide a full SQL reference for their own flavour.
I'm not sure whether you can actually insert the new column between existing columns or not but it makes no real difference anyway. You can write your queries to return any combination of columns in any order you want no matter what order they are in in the database itself.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|