Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ryanlcs
Yak Posting Veteran
62 Posts |
Posted - 2010-10-03 : 04:24:25
|
| HiI have a identity column where the values will become disorder, such as1,3,4,5,6,7,10,15How can I rearrange/reset the values so that it will be in "nice order" of 1,2,3,4,5,6,7,8Thanks. |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-03 : 05:00:18
|
| Is the identity column a primary key ?If not then you can drop the column and again add the column as identity column.But remember to consider the following Type of environment : Production or developmentNo of rows in tableThere are other ways too achieve the requirement. If you can provide more detailed info then we can suggest you better method. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2010-10-03 : 06:53:26
|
| Or how about adding ORDER BY $identity to your queries? Ordering data is a presentation issue, it has no bearing on how the data is stored or queried. |
 |
|
|
|
|
|
|
|