1. 程式人生 > >sql 函式字串拼接函式concat()

sql 函式字串拼接函式concat()

在我們使用SQL查詢的時候,往往會用到模糊查詢,而這個使用常常使用的字串的拼接:

例項: mysql資料庫

 select concat("11","22","33");

結果為: 112233

使用mybatis模糊查詢

        select *
        from addressee
        where    (mail like  concat('%',#{keyword},'%') or name like  concat('%',#{keyword},'%'))