Suppose you want to create a Course table,
Create Table DBO. Course (
Courseno int identity (1, 1 ),
Cname varchar (30 ),
Cdate varchar (20 ),
)
Insert a row of values, insert into DBO. Course values ('basic accounting', '11-Jan-89 ')
Delete again, delete from course where cname = 'basic account', insert a row of values, insert into DBO. course values ('basic accounting', '11-Jan-89 '), then courseno is no longer 1, and it is changed to 2 .... If you do not stop inserting and deleting, insert and delete .. Even though there is no row in the Course table, when you insert another row, his courseno will not start from 1, its value is equal to the number of times you insert (equivalent to the number of times you have not performed the delete operation before). I don't understand why .... If you want to insert a value later than the previous one, use the manual serial number ..