Results 1 to 3 of 3

Thread: SQL Query [resolved]

  1. #1

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655

    Resolved 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.

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  2. #2
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    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."

  3. #3

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655

    Resolved 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 .

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width