Advertisement

SQLwhere in中的多个值之间缺少逗号也能执行

阅读量:
复制代码
    select count(1) from the_table
       where column1 in ('value1','value2')
    
    -- 返回2000数据
    
    
      
      
      
      
    
复制代码
    select count(1) from the_table
       where column1 in ('value1','value2' -- 这里少了逗号
                    'value3','value4')
    -- 返回1000数据                    
    
    
      
      
      
      
    

全部评论 (0)

还没有任何评论哟~