Issue the following command to reseed mytable to start at 1:
DBCC CHECKIDENT (mytable, RESEED, 0)
Read about it in the Books on Line (BOL, SQL help). Also be careful that you don’t have records higher than the seed you are setting.
More Related Contents:
- SQL Server, How to set auto increment after creating a table without data loss?
- How to generate auto increment field in select query
- SQL Server – error when creating stored procedure
- What do Clustered and Non-Clustered index actually mean?
- Regex pattern inside SQL Replace function?
- Datatype for storing ip address in SQL Server
- SQL Server: Query fast, but slow from procedure
- Errors: “INSERT EXEC statement cannot be nested.” and “Cannot use the ROLLBACK statement within an INSERT-EXEC statement.” How to solve this?
- Is there a way to loop through a table variable in TSQL without using a cursor?
- sql server invalid object name – but tables are listed in SSMS tables list
- How to get a date in YYYY-MM-DD format from a TSQL datetime field?
- What columns generally make good indexes?
- What is a free tool to compare two SQL Server Databases? [closed]
- How can I make HTTP request from SQL server?
- SQL Server Management Studio alternatives to browse/edit tables and run queries [closed]
- Format SQL in SQL Server Management Studio
- #DELETE viewing SQL Server table in Access
- Get ROWS as COLUMNS (SQL Server dynamic PIVOT query)
- Grant Select on a view not base table when base table is in a different database
- SQL Server (localdb)\v11.0 explained
- SQL Server – join rows into comma separated list
- Which is quicker COALESCE OR ISNULL?
- How to set value to variable using ‘execute’ in t-sql?
- Data generators for SQL server? [closed]
- Taking the second last row with only one select in SQL Server?
- SQL Server Maximum rows that can be inserted in a single insert statment
- What is the difference between Cartesian product and cross join?
- sql geography to dbgeography?
- How to Bulk Insert from XLSX file extension?
- Count number of records returned by group by