Re: Rename column

From: Luqman (pearlsoft_at_cyber.net.pk)
Date: 12/24/04

  • Next message: alohasam: "RE: Saving a crlf in access 2003"
    Date: Fri, 24 Dec 2004 12:45:27 +0500
    
    

    To rename a column in Sql Server, use sp_rename system procedure.

    Rename a table
    This example renames the customers table to custs.

    EXEC sp_rename 'customers', 'custs'

    B. Rename a column
    This example renames the contact title column in the customers table to
    title.

    EXEC sp_rename 'customers.[contact title]', 'title', 'COLUMN'
    Best Regards,
    Luqman

    "Daniel Crichton" <msnews@worldofspack.co.uk> wrote in message
    news:#r6Uz7Q6EHA.4008@TK2MSFTNGP15.phx.gbl...
    > "SK" <SK@discussions.microsoft.com> wrote in message
    > news:BCE6768A-C2A8-47F7-868A-D962C54CEA6F@microsoft.com...
    > > that means SQL Server 7.0 is not SQL-92 compliant? I thought it claimed
    to
    > > be
    > > SQL-92 compliant??
    >
    > Are you sure RENAME COLUMN is part of SQL-92? I can't see it in the SQL-92
    > standard, and have found a few web sites which list it as an extension to
    > SQL-92.
    >
    > Dan
    >
    >


  • Next message: alohasam: "RE: Saving a crlf in access 2003"

    Relevant Pages

    • Re: Date Filter & Query
      ... First, rename your Date field: Date is a reserved word, and using it for ... > daily basis which customers have not been back in the 90 day period. ... > a Make Table Query that I can run every day or whenever, to filter records ...
      (microsoft.public.access.gettingstarted)
    • Lost owner role in public folder
      ... The formar administrator of one of my customers has managed to remove the ... owner of a public folder. ... Now we are not able to remove or rename. ...
      (microsoft.public.exchange.admin)
    • No user with Owner role in public folder (Exchange 2000)
      ... The formar administrator of one of my customers has managed to remove the ... owner of a public folder. ... Now we are not able to remove or rename. ...
      (microsoft.public.exchange.admin)
    • Re: Rename File name (logs and mdb)
      ... the database, rename the files and reattach. ... EXEC sp_detach_db 'MyDatabase' ... SQL Server MVP ...
      (microsoft.public.sqlserver.programming)
    • Re: Problem with java Rename function in solaris platform.
      ... Rename is just that. ... intended for moving files from drive to drive. ... exec a platform specific script that does it. ...
      (comp.lang.java.programmer)