If you mean that you wish to insert some data with existing valued in the
identity column then:
SET IDENTITY_INSERT dbname.schemaname.tablename ON
INSERT INTO dbname.schemaname.tablename ... -- code to insert
SET IDENTITY_INSERT dbname.schemaname.tablename OFF
If you mean that you no longer want the identity property on your table,
then you will need to do the following:
1. Create a new table that is just like the old table, but without the
IDENTITY property.
CREATE TABLE NewTableName
(... ) -- full specification for the table.
CREATE INDEX... -- create indexes on the new table also
2. SELECT * INTO NewTableName FROM TableName
3. EXEC sp_rename 'TableName', 'SaveTableName'
4. EXEC sp_rename 'NewTableName', 'TableName'
5. Check and make sure that everything is OK in the new copy of TableName.
6. DROP TABLE SaveTableName
RLF
wrote in message
> dear sir/madam
>
> In an online table, one of field identity set to 1. So its
> automatically increment its value to 1.
> But I have to set its identity off. But I dont know what is its query.
> I have no enterprise manager for its. so please help.
>
> Thanks in advance
>> Stay informed about: set identity off