Returns the value of the newly added record of the automatic increase segment.

xiaoxiao2021-03-06  113

Plus your inserted statement plus the following paragraph (select @@ identity as' identity ")

INSERT INTO TABLE (Field1, Field2, Field3)

VALUES ('Accountant', 12,125)

SELECT @@ identity as 'id'

So after you insert success, return a value, which is the ID you just inserted, use it when you open it.

Select * from table where id = xx

It can be positioned to the original record.

转载请注明原文地址:https://www.9cbs.com/read-101872.html

New Post(0)