INSERT INTO knowledge (title,contents) VALUES ('dsfsf','fsefs') SELECT @@IDENTITY AS id

INSERT INTO knowledge (title,contents) VALUES ('dsfsf','fsefs') SELECT CAST(scope_identity() AS int)

2种方法