单个存储过程,用于插入,更新,删除到多个表 [英] Single Stored procedure for insert,update,delete to multiple table

查看:78
本文介绍了单个存储过程,用于插入,更新,删除到多个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是.Net平台的新手.我怀疑如何为插入,更新和删除多个表编写单个存储过程.谁能建议我如何有效地做到这一点?

在这里,我得到的链接在那里,他们传递了用于删除的空值. 如果是这样,如何将用于C#的删除操作的NULL值传递给存储过程

I''m new to .Net platform. I have a doubt that how to write single stored procedure for insert,update and delete to multiple tables. Can anyone suggest me that how to do this efficiently?

here i got the link there they passed null value for delete.
if so, How do i pass NULL value for delete operation from C# to stored procedure

推荐答案

检查^ ]链接.


我已经回答了一个月前在这里提出的类似问题.

用于插入,更新,删除到单个存储过程多个表格 [
Already I have answered for the similar question here which was asked a month before.

Single Stored procedure for insert,update,delete to multiple table[^]

Do customizations based on your need(I mean you need to include multiple Insert/Update/Delete queries in the stored procedure).


从另一个表插入数据,然后按照下面的方式.:rose :: thumbsdown:

Insert the data from another table, then follow the below way..:rose::thumbsdown:

INSERT INTO InsCarriers_Copy
                                (   InsCarrierId,
                                    InsCarrierName,
                                    ShortDescription,
                                    ContactPhoneNo,
                                    Location,
                                    PhoneExt,
                                    Fax,
                                    Address1,
                                    Address2,
                                    ZipCode,
                                    City,
                                    State,
                                    IsActive
                                )
SELECT      InsCarrierId,
            InsCarrierName,
            ShortDescription,
            ContactPhoneNo,
            Location,
            PhoneExt,
            Fax,
            Address1,
            Address2,
            ZipCode,
            City,
            [State],
            IsActive
FROM        InsCarriers


这篇关于单个存储过程,用于插入,更新,删除到多个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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