개발/잡종
mysql update 이중쿼리, 문자열 붙이기
북치기_개발모드
2022. 4. 6. 18:32
반응형
같은 update문 인데도 이렇게나 다르다.
mysql
update user set score=score+"+score+", flag=concat(flag,'"+flagA+"')
where id='"+id+"' and (select flag from (select flag from user where id = '"+id+"') as temp )
not like '%"+flagA+"%'"
oracle
update user set score=score+"+score+", flag=flag||'"+flagA+"'
where id='"+id+"' and (select flag from user where id = '"+id+"') t not like '%"+flagA+"%'"
어쩔 수 없이 쓰는거긴하다만..
oracle에 적응돼서 잘 안맞는거겠지..
문자열 붙일 때
오라클
flag = flag || "문자열"
mysql
flag = concat(flag,"문자열")
반응형