How can we start row number to 100 or How can we start row number to to start from 100?

 Posted by vishalneeraj-24503 on 10/7/2014 | Category: Sql Server Interview questions | Views: 499 | Points: 40

We can use below script
Create Table tbl_name(col1 dataType Identity(StartingValue,Inrement),col2 dataType);

For Example:-
Create Table Project_Master(Project_ID int identity(100,5),Projct_Name varchar(100));

Above query will create a table called Project_Master,Project_ID column will start with 100 and increment will be +5 like 100,105 ,110 ... and so on..

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response