I have a product table. It had 1000+ products. I deleted all the products. Now, when I add any product, the product_id starts from above 1000. Is there any method to reset it to 1? I'm new to programming and databases. Any sort of help will be much appreciated.
            Asked
            
        
        
            Active
            
        
            Viewed 419 times
        
    3 Answers
2
            You could run the truncate table command
TRUNCATE TABLE table_name; 
 
    
    
        chrisShick
        
- 1,096
- 8
- 21
- 
                    1http://stackoverflow.com/questions/20559893/comparison-of-truncate-vs-delete-in-mysql-sqlserver – Gaurav Lad Nov 02 '15 at 07:48
 
    

