how to rest identity columns in sql server

Answer Posted / muthu kumar

create table t(id int identity(seed,increment))

where seed is starting number and increment is number to be
incremented.

create table t(id int identity(1,1),name varchar(50))

so the id will be start with 1 and will be incremented 1 by
1 each time when record is get insered

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of except clause? How does it differ from not in clause?

548


How to assign null values to variables or columns?

545


What the class forname () does?

536


What are scheduled tasks in sql server?

540


what type of index will get created after executing the above statement? : Sql server database administration

533






Explain the concept of recursive stored procedure.

493


Explain the properties of sub-query in sql server?

505


What happens if the update subquery returns no rows in ms sql server?

587


What are the different types of backups avaialabe in sql server 2005?

620


What is cursors?

636


How would you go about developing a ssrs report?

110


Why do we partition data?

613


what's the maximum size of a row? : Sql server database administration

540


What is the difference between ddl and dml?

566


Can you import Microsoft Excel data to SSRS?

89