如何使用两个表进行插入来编写存储过程 [英] how to write stored procedure using two table for inserting

查看:55
本文介绍了如何使用两个表进行插入来编写存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个表customer和shop.how使用单个SP将数据插入到这个表中。

I have two table customer and shop.how to insert data into this tables using a single SP.

推荐答案

创建过程procename

@variablename数据类型



as

开始

此处为客户和店铺插入声明



end
Create procedure procename
@variablename datatype

as
begin
insert statement here for customer and shop here

end


参考此链接:



1. 将数据插入多个表的正确方法(存储过程)

2. SQL Server存储过程以插入多个表


这篇关于如何使用两个表进行插入来编写存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆