web developer

[myBatis/SQL] LIKE + CONCAT / DBMS별 sql문 본문

Persistence Framework/iBatis, MyBatis

[myBatis/SQL] LIKE + CONCAT / DBMS별 sql문

trueman 2022. 3. 2. 23:06
728x90
728x90

MySQL

SELECT * FROM TABLE_NAME
WHERE COLUMN_NAME LIKE CONCAT(‘%’, #{Keyword}, ‘%’)

Oracle

SELECT * FROM TABLE_NAME
WHERE COLUMN_NAME LIKE '%'||#Keyword#||'%'

Ms-Sql

SELECT * FROM TABLE_NAME
WHERE COLUMN_NAME LIKE '%' + #Keyword# + '%'

출처 : https://dongram.tistory.com/12

728x90
728x90