Re: Rename table
From: Itzik Ben-Gan (itzik_at_REMOVETHIS.SolidQualityLearning.com)
Date: 03/15/04
- Next message: Blue Man: "Re: DateTime problem"
- Previous message: Adam Machanic: "Re: Rename table"
- In reply to: GeoWorks: "Rename table"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 15 Mar 2004 17:08:38 +0200
T-SQL has the sp_rename procedure to rename tables, e.g.,
EXEC sp_rename 'T1', 'T2'
-- BG, SQL Server MVP www.SolidQualityLearning.com "GeoWorks" <rcetrangolo@geoworks.com.uy> wrote in message news:88A6B4A5-69F8-4D87-B002-BBC054170A8B@microsoft.com... > I want to rename a table using an SQL statement. > I know in many data bases I can write 'ALTER TABLE pp RENAME TO pp2' to change the name of 'pp' table to 'pp2'. > It seems doesn't work in SQL Server. > There is a way to rename a table using only ANSI SQL statement?, I meen I'm not programming over the database, I'm just progamming an upper layer to writes SQL scripts to merge database models and I have to rename certain tables to preserve its values (if there are some) and then try to copy values to the new table definition (if it is possible). > > Thanks
- Next message: Blue Man: "Re: DateTime problem"
- Previous message: Adam Machanic: "Re: Rename table"
- In reply to: GeoWorks: "Rename table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|