Reason and impact of the Code SKIP:
In the sybase database, if the database is enabled, the database service process is forcibly terminated due to abnormal reasons (crash or power failure.
The Automatically increasing field will generate a jump. When you insert a record into the data table, the auto-increment field will jump to a very large value, so that the auto-increment value of the primary key is very likely to be exhausted, or because the value is too large, the data type such as int type in the application cannot accommodate such a large value, however, you cannot perform related operations in the program.
Solution:
If no skip occurs, follow these steps:
1. Run the [select 'SP _ chgattribute '+ name +', ''' + 'Identity _ gap '+ ''' +', 60 go'
From sysobjects
Where type = 'U ']. 60 indicates a value based on the perception. Generally, the larger the value, the better the performance. However, the larger the value, the larger the number of hops when the database service process ends abnormally.
2. Copy the result of 1 to the SQL editing area and then execute it.
If a checkpoint has already occurred, export the data in the table, recreate the data table, and then execute 1 and 2. Then import the data.
After that:
The biggest problem with the Sybase auto-incrementing field is that when the database is transplanted, if the data table is associated by the auto-incrementing primary key, after the data is re-imported, maybe the Foreign keys in the Master/Slave table cannot be associated. I didn't expect this at the beginning. Now we have a boat and there is no way to do it. In the future, you should use the auto-increment field as the primary key with caution.