我有这样的存储过程:
alter procedure [dbo].[delivary] @dedate nvarchar(100),
@carid nvarchar(100),
@transid integer as
begin
select t.transactID
from Transaction_tbl t
where t.TBarcode = @carid
update Transaction_tbl
set DelDate = '' + @dedate + '', Status=5
where TBarcode = @carid
update KHanger_tbl
set Delivered=1
where transactid=@transid
end
我能够更新我的交易表。我还想KHanger_table
用TransactID
匹配的@carid
.
我怎么能这样做?