开发者

loops in stored procedure

开发者 https://www.devze.com 2023-03-18 18:01 出处:网络
I have written a SP that is working as expected. It will return the customer ID and monthly and annual fees he should be charged.

I have written a SP that is working as expected. It will return the customer ID and monthly and annual fees he should be charged.

Now what I wa开发者_JS百科nt to do is to insert the relevant records in various other tables. Is it possible to use a transaction within stored procedure? How do I take one record at a time and insert into other tables?


Is it possible to use a transaction within stored procedure?

++ Yes it is. You may read more here

How do I take one record at a time and insert into other tables?

++ Perhaps using INSERT INTO SELECT, one insert per table.

0

精彩评论

暂无评论...
验证码 换一张
取 消