CREATE TABLE masterTbl (
id INT IDENTITY(1,1) CONSTRAINT pk_id PRIMARY KEY,
name VARCHAR(100))
INSERT INTO masterTbl VALUES ('ABC', 'XYZ','PQR')
Select * FROM masterTbl
結果:
id | name
---------------------
1 | ABC
2 | XYZ
3 | PQR
DELETE FROM masterTbl WHERE id=1
現在
Select * FROM masterTbl
結果:
id | name
---------------------
2 | XYZ
3 | PQR
現在我想運行:
INSERT INTO masterTbl (id, name) VALUES (1, 'MNO')
這怎麼可能?
相關(或複製):http://stackoverflow.com/questions/751522/how-to-change-identity列值 - 編程方式 – adatapost