What is the out put of the following query when it is alone executed against the sample-table definition ?
SampleTable: create table sample-table ( sid int identity(1,1) , sname varchar(40) )
Query: insert into sample-table values (1,'rajeev') ;
Query will produce a parser error.
Query will get compiled but is not executed and database engine will throw an exception.
A row is inserted with 1,'rajeev' as sid and sname values respectively.
A row is inserted with 2 and rajeev as values into sid and sname respectively.
We are not allowed to insert values into the columns which are defined using identity property. The columns which are having identity property must get values automatically based on the last inserted identity column value.
Back To Top