读书人

Delete * from table1 where ID =怎么

发布时间: 2013-04-07 12:50:11 作者: rapoo

Delete * from table1 where ID =如何添加数组?(vb.net2008)
本帖最后由 pengwei0417 于 2013-04-03 13:15:18 编辑 如题,使用vb.net 要删除的ID保存在数组中IDstr(),想使用一条语句将数中ID的数组删除,该如何写。

dim commandstr as string="Delete * from table1 where ID in ??????"



[解决办法]
dim strID as string string.Join(",", IDstr)
dim commandstr as string="Delete * from table1 where ID in ( " + strID + ")"
[解决办法]
commandstr = "delete from table1 where id in (";
commandstr = commandstr + string.join(",",idstr)+arrs +")";
执行sql语句

读书人网 >VB Dotnet

热点推荐