ASP.NET,C#如何编写这个sql命令

时间:2015-09-08 18:29:16

标签: c# sql asp.net sqlcommand

如何在asp.net c#代码后面编写这段代码?

我要做的是选择invoicetableorderno的所有行,其中session等于当前inventorytable,并从中删除SqlCommand cmd = new SqlCommand("UPDATE inventorytable JOIN invoicetable ON inventorytable.ItemID = invoicetable.ItemID SET inventorytable.inventory = inventorytable.inventory-invoice.QTY WHERE invoicetable.No='" + Convert.ToInt32(Session["invoiceno"]) + "'" , con); InsertUpdateData(cmd); 的库存。与itemid的匹配的invoicetable数量。

{{1}}

0 个答案:

没有答案