Ibatis.net结合oracle实现批量删除写法

要删除的字符串ID为:string SDSALES_IDString = 1,2,3,4,5,6,7

//转成Array

Array array = SDSALES_IDString.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToArray();

在模型定义一个 public Array SDSALES_IDs {get;set;}

XML:

      DELETE FROM T_LABEL_SDSALES WHERE
     
        SDSALES_ID IN
       
          #SDSALES_IDs[]#
       

     

   

你可能感兴趣的:(Ibatis.net结合oracle实现批量删除写法)