要在不使用多个insert语句的情况下将数据插入到多个表中,该怎么办? [英] For inserting data to multiple tables without using multiple insert statements ,how to do ?

查看:74
本文介绍了要在不使用多个insert语句的情况下将数据插入到多个表中,该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

假设如果我想在不使用多个insert语句的情况下将数据插入到多个表中,该如何实现以及如何实现
在代码中?

在此先感谢

Naveen ...

Hi all ,

Suppose if i want to insert data to multiple tables without using multiple insert statements,how can i achieve it.and how to do it
in the code ?

thanks in advance

Naveen...

推荐答案

编写存储过程,然后调用该存储过程.存储过程中仍将需要有多个插入.

在执行命令之前,您需要添加存储过程所需的参数. CodeProject上有很多这样的示例.

干杯.
Write a stored procedure and call that instead. The stored procedure will still need to have multiple inserts in it.

Before you execute the command you''ll need to add the parameters required for the stored proc. There are many samples of this here on CodeProject.

Cheers.


这篇关于要在不使用多个insert语句的情况下将数据插入到多个表中,该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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