Home > database >  Sybase identity value reduction
Sybase identity value reduction

Time:09-29

Using the identity in the process of storage field to do sorting, hope the field values in the storage process to run, value to start from 1, rather than increasing every time, in addition to running up,


A,
1, set identity_insert & lt; Table> On
2, explicitly add a record (specified identity field values)
3, set identity_insert & lt; Table> Off

Second,
Truncate table
Method above is found on the web, not possible, don't know if my operation has a problem;
Please comment how to identity value can only be achieved initial into 1, thank you

CodePudding user response:

Advice to send the post to sybase version below to ask next, although is a relational database, but are still a little difference between this and the SQL server, SQL server you use truncate table can realize the function you want to

CodePudding user response:

To set up a table, to import the data in the past

CodePudding user response:

How people how to deal with the guidance of the

CodePudding user response:

The exec sp_chgattribute @ table_name, 'identity_burn_max' 0, @ gap_reset_str
  • Related