너무 궁금해서 아무리 찾아도 저와 비슷한 질문을 한 사람이 없더군요. like 검색시에 대소문자를 구분해서 검색하는 방법이 뭐가 있을까 생각하다가... 예를들어, name 컬럼에 abc 라는 값이 들어있고, select * from table where name like '%Bc%' 이렇게 해도 검색이 되더라 이겁니다. 물론 필드형을 바꾸어 주거나 하는 방법이 있지만.... select * from table where binary(name) like '%Bc%' 이렇게 하면 대소문자를 구분하여 검색이 안되고, select * from table where binary(name) like '%bc%' 이렇게 해야만 검색
댓글 9개
천재조상훈
12년 전
감사요
devdev
12년 전
ㅎ 그렇군요..
SonyZero
12년 전
ok
12년 전
http://dev.mysql.com/doc/refman/5.5/en/case-sensitivity.html
To make this search case sensitive, make sure that one of the operands has a case sensitive or binary collation. For example, if you are comparing a column and a string that both have the latin1 character set, you can use the COLLATE operator to cause either operand to have the latin1_general_cs or latin1_bin collation:
col_name COLLATE latin1_general_cs LIKE 'a%'
col_name LIKE 'a%' COLLATE latin1_general_cs
col_name COLLATE latin1_bin LIKE 'a%'
col_name LIKE 'a%' COLLATE latin1_bin
To make this search case sensitive, make sure that one of the operands has a case sensitive or binary collation. For example, if you are comparing a column and a string that both have the latin1 character set, you can use the COLLATE operator to cause either operand to have the latin1_general_cs or latin1_bin collation:
col_name COLLATE latin1_general_cs LIKE 'a%'
col_name LIKE 'a%' COLLATE latin1_general_cs
col_name COLLATE latin1_bin LIKE 'a%'
col_name LIKE 'a%' COLLATE latin1_bin
dsv421
12년 전
감사합니다
12년 전
감사합니다
12년 전
감사합니다
12년 전
감사합니다
takumi22
12년 전
감사합니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 9년 전 | 400 | ||
| 7829 |
|
9년 전 | 579 | |
| 7828 | 9년 전 | 509 | ||
| 7827 | 9년 전 | 403 | ||
| 7826 | 9년 전 | 410 | ||
| 7825 | 10년 전 | 456 | ||
| 7824 | 10년 전 | 433 | ||
| 7823 | 10년 전 | 348 | ||
| 7822 | 10년 전 | 338 | ||
| 7821 | 10년 전 | 294 | ||
| 7820 | 10년 전 | 335 | ||
| 7819 |
|
10년 전 | 738 | |
| 7818 | 10년 전 | 367 | ||
| 7817 | 10년 전 | 491 | ||
| 7816 | 10년 전 | 390 | ||
| 7815 | 10년 전 | 591 | ||
| 7814 | 10년 전 | 414 | ||
| 7813 | 10년 전 | 356 | ||
| 7812 | 10년 전 | 376 | ||
| 7811 | 10년 전 | 381 | ||
| 7810 | 10년 전 | 542 | ||
| 7809 | 10년 전 | 469 | ||
| 7808 | 10년 전 | 353 | ||
| 7807 | 10년 전 | 388 | ||
| 7806 |
프로그래머7
|
10년 전 | 1318 | |
| 7805 | 10년 전 | 1256 | ||
| 7804 |
zahir1312
|
10년 전 | 763 | |
| 7803 |
|
10년 전 | 1357 | |
| 7802 | 10년 전 | 446 | ||
| 7801 | 10년 전 | 849 | ||
| 7800 | 10년 전 | 1074 | ||
| 7799 | 10년 전 | 532 | ||
| 7798 | 10년 전 | 486 | ||
| 7797 | 10년 전 | 489 | ||
| 7796 | 10년 전 | 327 | ||
| 7795 | 10년 전 | 483 | ||
| 7794 | 10년 전 | 523 | ||
| 7793 | 10년 전 | 1027 | ||
| 7792 | 10년 전 | 441 | ||
| 7791 | 10년 전 | 528 | ||
| 7790 | 10년 전 | 488 | ||
| 7789 |
fbastore
|
10년 전 | 1426 | |
| 7788 | 10년 전 | 523 | ||
| 7787 | 10년 전 | 382 | ||
| 7786 | 10년 전 | 551 | ||
| 7785 | 10년 전 | 557 | ||
| 7784 | 10년 전 | 613 | ||
| 7783 | 10년 전 | 423 | ||
| 7782 | 10년 전 | 471 | ||
| 7781 | 10년 전 | 881 | ||
| 7780 | 10년 전 | 799 | ||
| 7779 | 10년 전 | 766 | ||
| 7778 | 10년 전 | 348 | ||
| 7777 | 10년 전 | 432 | ||
| 7776 | 10년 전 | 439 | ||
| 7775 | 10년 전 | 381 | ||
| 7774 | 10년 전 | 620 | ||
| 7773 | 10년 전 | 366 | ||
| 7772 | 10년 전 | 711 | ||
| 7771 | 10년 전 | 360 | ||
| 7770 | 10년 전 | 632 | ||
| 7769 | 10년 전 | 358 | ||
| 7768 | 10년 전 | 585 | ||
| 7767 | 10년 전 | 1151 | ||
| 7766 | 10년 전 | 478 | ||
| 7765 | 10년 전 | 502 | ||
| 7764 |
잘살아보자
|
10년 전 | 359 | |
| 7763 |
|
10년 전 | 1430 | |
| 7762 |
Tosea
|
10년 전 | 1039 | |
| 7761 | 10년 전 | 628 | ||
| 7760 |
잘살아보자
|
10년 전 | 659 | |
| 7759 |
잘살아보자
|
10년 전 | 478 | |
| 7758 |
잘살아보자
|
10년 전 | 570 | |
| 7757 | 10년 전 | 1222 | ||
| 7756 |
ITBANK
|
10년 전 | 1240 | |
| 7755 | 10년 전 | 1918 | ||
| 7754 | 10년 전 | 1038 | ||
| 7753 | 10년 전 | 860 | ||
| 7752 | 10년 전 | 1372 | ||
| 7751 |
잘살아보자
|
10년 전 | 507 | |
| 7750 |
잘살아보자
|
10년 전 | 463 | |
| 7749 |
잘살아보자
|
10년 전 | 467 | |
| 7748 |
잘살아보자
|
10년 전 | 455 | |
| 7747 |
잘살아보자
|
10년 전 | 558 | |
| 7746 |
잘살아보자
|
10년 전 | 667 | |
| 7745 |
잘살아보자
|
10년 전 | 897 | |
| 7744 |
잘살아보자
|
10년 전 | 404 | |
| 7743 | 10년 전 | 929 | ||
| 7742 |
starbros
|
10년 전 | 818 | |
| 7741 |
잘살아보자
|
10년 전 | 648 | |
| 7740 |
잘살아보자
|
10년 전 | 509 | |
| 7739 |
잘살아보자
|
10년 전 | 450 | |
| 7738 |
잘살아보자
|
10년 전 | 514 | |
| 7737 |
잘살아보자
|
10년 전 | 477 | |
| 7736 |
잘살아보자
|
10년 전 | 498 | |
| 7735 |
잘살아보자
|
10년 전 | 826 | |
| 7734 |
잘살아보자
|
10년 전 | 418 | |
| 7733 |
잘살아보자
|
10년 전 | 525 | |
| 7732 |
잘살아보자
|
10년 전 | 679 | |
| 7731 |
잘살아보자
|
10년 전 | 603 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기