以前用oracle链接字符串用 || 链接,最近开发中用到mysql链接字符的方法用 concat() 函数。
比如模糊查询中用到链接字符串oracle的方法是:
mysql中的方法是:
比如模糊查询中用到链接字符串oracle的方法是:
<select id="getP2pCompanyInformationByName" parameterType="string" resultType="com.***.finance.share.p2p.entity.P2pCompanyInformation">
SELECT * FROM p2p_company_infomation where companyFullName like '%'||#{companyFullName}||'%'
</select>
mysql中的方法是:
<select id="getP2pCompanyInformationByName" parameterType="string" resultType="com.***.finance.share.p2p.entity.P2pCompanyInformation">
SELECT * FROM p2p_company_infomation where companyFullName like CONCAT('%',#{companyFullName},'%')
</select>