hai all,
table : country
primary key: country_id (identity not set)
my question is.
i want to change country_id property to set identity, and insert a record and then i want to release identity (identity set=off).
how to write a query for it?
thanx in advance.
Regards Nirmal
Option 1:
1. Alter your table to set identity property to country_id.
2. Insert the record.
3. Alter the table back to remove identity.
Option 2:
1. Use
IDENTITY() function in SELECT INTO to create a new table.
2. Inspect the new table.
3. Truncate your current table
4. Insert the new table to your current one
5. Drop your new table
Option 3:
If you only need something sequential:
Try
this
Happy coding
-- CK