Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Database design as follows;

Receipt Id text
Bill No text
Receipt Amt Number


In database starting from Receipt id 1 to 1000 records are there in the database.

I want again the receipt id again start with 1.

how can i do? already i have 1000 records in the database. starting from 1 to 1000 records.

how can i do?

Please help me.

Regards,
Narasiman P
Posted

If ID is the primary key in your database then you can't, otherwise it is up to you and your application to do the numbering.

Generally it is a better idea not to rely on the primary key, and have your own numbering for this very reason.
 
Share this answer
 
Comments
Maciej Los 31-Mar-13 15:16pm    
+5!
Mehdi Gholam 1-Apr-13 1:11am    
Thanks Maciej!
Please, read Mehdi Gholam solution.

Try this:
SQL
SELECT [Receipt Id], [Bill No], [Receipt Amt Number]
FROM YourTable
WHERE [Receipt Amt Number] = 1
 
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