1、sql语句中
insert into tableName() output
inserted.id values()
2 、存储过程中
ALTER
PROCEDURE
dbo.getBuyMedicID
(
@id int output,
@AllsumMoney
money
)
AS
begin
INSERT INTO
t_buyMedic(sumMoney,buyDate)
VALUES(@AllsumMoney,getdate())
select
@[email protected]@identity
end
RETURN
时间: 2024-10-08 15:44:14