Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20210308] MySQL(MyBatis) 비교연산자, MySQL 대소문자 #61

Open
JuHyun419 opened this issue Mar 8, 2021 · 0 comments
Open

[20210308] MySQL(MyBatis) 비교연산자, MySQL 대소문자 #61

JuHyun419 opened this issue Mar 8, 2021 · 0 comments
Labels

Comments

@JuHyun419
Copy link
Owner

JuHyun419 commented Mar 8, 2021

MyBatis에서 MySQL 부등호 사용 및 사용 방법

  • 쿼리문 밖에 <![CDATA ]]> 사용
  • CDATA를 사용하지 않고 HTML 사용 방식으로 치환
> --> &gt;
< --> &lt;
>= --> &gt;=
<= --> &lt;=
<> --> &lt;&gt; // !=, Not Equals

MySQL에서 대소문자 구분하기

  • VARCHAR 컬럼을 binary 컬럼으로 생성하기
 `id` binary(20) DEFAULT NULL,

  • 컬럼 생성할 때 VARCHAR 뒤에 binary 추가하기
`id` varchar(20) binary DEFAULT NULL,

  • WHERE 조건에 COLLATE utf8_bin; 추가하기
SELECT * FROM user WHERE id = ‘test’ COLLATE utf8_bin;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant