|
-
Sep 7th, 2006, 11:31 AM
#1
Thread Starter
Fanatic Member
SQL Query [resolved]
After creating an SQL table, is there a way to rename a column from a simple query?
(Alter, or update...?)
I'm using MS SQL Server 2000...
I am told this cannot be done unless going through all the files and renaming the appropriate fields with a program...
True?
Last edited by Ruku; Sep 8th, 2006 at 07:58 AM.
-
Sep 7th, 2006, 12:34 PM
#2
Re: SQL Query [Unresolved]
Of course its possible:
This example renames the contact title column in the customers table to title.
EXEC sp_rename 'customers.[contact title]', 'title', 'COLUMN'
Jorge
"The dark side clouds everything. Impossible to see the future is."
-
Sep 8th, 2006, 07:57 AM
#3
Thread Starter
Fanatic Member
Re: SQL Query [Unresolved]
EXEC sp_rename 'customers.[contact title]', 'title', 'COLUMN'
exacly... so you really need an executable program from the server agent, not a simple function query... looks like there is no other way .
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
|