how to rest identity columns in sql server

Answer Posted / yvbchowdary

The identity is similar to squence object in oracle. syntax
for identity column is
<column-name> <data type> identity(start value,increment)
ex:
empno int identity(100,2)

suppose if u want to add an odd value i.e, 50; u can also
add
first execute IDENTITY_INSERT ON
and then u can insert whatever values u want. then again
execute IDENTITY_INSERT OFF

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a system database and what is a user database?

768


What are the new security features added in sql server 2012? : sql server security

703


Explain full-text query in sql server?

726


Are connections to sql server encrypted?

746


How to identify current user in ssrs report?

326






What is the difference between Triggers and Stored Procedure?

764


How check triggers in sql server?

672


Define clusters?

815


How to set a database state to offline in ms sql server?

717


Explain what stored procedure sp_replcounters is used for? : sql server replication

1236


How can I know what locks are running on which resource?

707


What is the need for group functions in sql?

745


Explain the different types of backups available in sql server? : sql server database administration

679


Relational calculus is what type of language?

780


How to list all columns in a table using odbc_columns()?

727