SmartSql icon indicating copy to clipboard operation
SmartSql copied to clipboard

where条件里In查询是怎么写的

Open KillingMeNow opened this issue 5 years ago • 1 comments

如想生成的sql为: select * from table where id in (@idarr) , idarr = '1','2','3'

<Statement Id="QueryByIDListAsync">
   Select  *  From Table where  ID in 
   <Where>
     <IsNotEmpty Prepend="And" Property="ID">
       ID =  @idarr
     </IsNotEmpty>
   </Where>
 </Statement>

KillingMeNow avatar Dec 21 '20 08:12 KillingMeNow

https://smartsql.net/config/sqlmap.html#statement-%E7%AD%9B%E9%80%89%E5%AD%90%E6%A0%87%E7%AD%BE image

Ahoo-Wang avatar Dec 21 '20 08:12 Ahoo-Wang