我已存儲的過程是這樣的:存儲過程更新兩個表不同的ID
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 [email protected]
end
我能更新我的事務表。 我也想更新表KHanger_table
與TransactID
匹配@carid
。
我該怎麼做?
這工作正常,,先生,,,謝謝 – user2510547