前言
旧没用又忘记了, 又没有 intellisense, 记入这里吧.
Reset Auto Increment
DBCC CHECKIDENT ('TableName'); -- check current DBCC CHECKIDENT ('TableName', RESEED, 0); -- reset to 0, next is 1
Int to String with Leading Zero
SELECT FORMAT(1, 'd2') --01
d2 就 2 位数, 3 就 3位数, 以此类推