Answer: We can use below script
Syntax:-
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