zoukankan      html  css  js  c++  java
  • 数据库拼接字符模糊查询语句(mybatis中运用(xml文件))

       concat:数据库中拼接字符串方法

     distinct :消除重复行

    group by:分组排序

    方法1;

    select distinct function_name,function_module,function_url,date
    from agent_function
    where
    concat('',function_name,function_module) like CONCAT('%',#{_parameter}, '%')

    方法2;

    select distinct function_name,function_module,function_url,date
    from agent_function
    where function_name LIKE CONCAT(CONCAT('%', #{_parameter}), '%') or
    function_module LIKE CONCAT(CONCAT('%', #{_parameter}), '%')

  • 相关阅读:
    woj 1574
    UESTC 594 我要长高 dp单调队列
    HDU 3401 Trade dp 单调队列优化
    HDU 2844 Coins 多重背包
    2-1
    1-2
    1-1
    12-1
    9-1
    14-8
  • 原文地址:https://www.cnblogs.com/mingqi/p/6485352.html
Copyright © 2011-2022 走看看