MyBatis sql中test判断Boolean

MyBatis  sql中test判断Boolean

【三种方式】: 


        
            
                UPDATE epc_subject_center s
                SET s.have_new_comment=1
                WHERE s.id=#{id}
            
            
                UPDATE epc_subject_center s
                SET s.have_new_comment=0
                WHERE s.id=#{id}
            
        
    

        
            
                UPDATE epc_subject_center s
                SET s.have_new_comment=1
                WHERE s.id=#{id}
            
            
                UPDATE epc_subject_center s
                SET s.have_new_comment=0
                WHERE s.id=#{id}
            
        
    

 

 

 

你可能感兴趣的:(SQL)