Set the Identity for a colunm keeping its values
From: Paul via .NET 247 (anonymous_at_dotnet247.com)
Date: 03/07/05
- Next message: Jean-Fran?ois M?nard via .NET 247: "Problem with text file dsn in web service"
- Previous message: Sahil Malik: "Re: Oracle Connectivity/Windows Service"
- Next in thread: Robbe Morris [C# MVP]: "Re: Set the Identity for a colunm keeping its values"
- Reply: Robbe Morris [C# MVP]: "Re: Set the Identity for a colunm keeping its values"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 07 Mar 2005 11:19:06 -0800
Hi,
On SQL Server, e.g.: table X, I want to change the status of the column id_x to IDENTITY.
I already have some values for id_x in the table and I want to keep them. How can I change the status and in the same time keep the old values? Or to do an UPDATE, not INSERT, later on id_x assumed that it has already the IDENTITY status. The table is very big and I want to copy it from one place to another where the new table should have a column as IDENTITY but the old values from the old column that was also declared as Identity.
I can use ADO.NET or simply SQL queries on my server.
Thank you in advance
Paul
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>e7jwwXkxIkS7XzxpZ5tN8w==</Id>
- Next message: Jean-Fran?ois M?nard via .NET 247: "Problem with text file dsn in web service"
- Previous message: Sahil Malik: "Re: Oracle Connectivity/Windows Service"
- Next in thread: Robbe Morris [C# MVP]: "Re: Set the Identity for a colunm keeping its values"
- Reply: Robbe Morris [C# MVP]: "Re: Set the Identity for a colunm keeping its values"
- Messages sorted by: [ date ] [ thread ]