TSQL : Start Identity at 0 or 1

An identity column automatically increments by a set interval and a set starting point. If you want to start your identity values at 1, then increment by 1… If you want to start your identity values at 0, then increment by 1… If you want to start your identity values at 0, then increment by […]

TSQL : Check if Table Exists…

You can get this from SQL Management Studio via the General scripts function however an outline is provided here for reference…useful when you want to check a table exists before doing something…

TSQL: Reset Table Identity Value with Reseed

The following example reseeds the identity value back to 1 for the table [schema]/[tablename]…this is useful for example after executing a truncate table where you need to reload the table from identity value 1 again :