Rename table in MS SQL (T-SQL)

To rename the "customers" table to "custs":

EXEC sp_rename \'customers\', \'custs\'


Example from this MSDN document:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ra-rz_3ns5.asp


Related Scribbles:
  • SQL Server


  • ID: 508
    Author:
    leonard
    Date Updated:
    2004-06-29 14:44:52
    Date Created:
    2004-06-29 14:44:52

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> Rename table in MS SQL (T-SQL)
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.