Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Experts

I have a table which has about 11000 row. There is a column named Account which varchar(12) And the last 8 digit starts from 1 and now arrived to 21045.

Now I am going to insert 2000 row in this table using a select statement and I want to find the gaps.

How can I find the gaps?
Posted
Updated 2-May-14 22:57pm
v3
Comments
phil.o 3-May-14 4:42am    
Why do you care about IDs? This is typically handled by the database engine which will know how to reuse gaps when it needs them.
Ideally primary keys shouldn't even be presented to users. There is no point in trying to maintain 'by hand' an identity field.
Meysam Toluie 3-May-14 4:50am    
sorry It was my mistake to post wrong question. See the updates.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900