yesn 发表于 2018-10-23 10:14:47

mybatis 之动态SQL

  

  

  
   
  
   
  
      
  
      
  
      
  
   
  
   
  
      select * from user_info where 1=1
  
      
  
            and user_id =#{userId}
  
      
  
      
  
            and user_name like #{userName}
  
      
  
      
  
            and user_sex = #{userSex}
  
      
  
   
  
   
  
      select * from user_info where 1=1
  
      
  
            
  
                and user_id =#{userId}
  
            
  
            
  
                and user_name like #{userName}
  
            
  
            
  
                and user_sex = #{userSex}
  
            
  
      
  
   
  
   
  
      select * from user_info
  
      
  
            
  
                and user_id =#{userId}
  
            
  
            
  
                and user_name like #{userName}
  
            
  
            
  
                and user_sex = #{userSex}
  
            
  
      
  
   
  
   
  
      select * from user_info
  
      
  
            
  
                and user_id =#{userId}
  
            
  
            
  
                and user_name like #{userName}
  
            
  
            
  
                and user_sex = #{userSex}
  
            
  
      
  
   
  

  
   
  
      update user_info
  
      
  
            
  
               user_name=#{userName},
  
            
  
            
  
               user_sex=#{userSex},
  
            
  
      
  
      where user_id=#{userId}
  
   
  
   
  
      select * from user_info where user_id in
  
      
  
            #{item}
  
      
  
   
  



页: [1]
查看完整版本: mybatis 之动态SQL