너무 궁금해서 아무리 찾아도 저와 비슷한 질문을 한 사람이 없더군요. 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년 전
감사합니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7930 | 9년 전 | 394 | ||
| 7929 | 9년 전 | 303 | ||
| 7928 | 9년 전 | 402 | ||
| 7927 | 9년 전 | 321 | ||
| 7926 | 9년 전 | 652 | ||
| 7925 | 9년 전 | 338 | ||
| 7924 | 9년 전 | 321 | ||
| 7923 | 9년 전 | 332 | ||
| 7922 | 9년 전 | 352 | ||
| 7921 | 9년 전 | 392 | ||
| 7920 | 9년 전 | 308 | ||
| 7919 | 9년 전 | 327 | ||
| 7918 | 9년 전 | 481 | ||
| 7917 | 9년 전 | 323 | ||
| 7916 | 9년 전 | 394 | ||
| 7915 | 9년 전 | 392 | ||
| 7914 | 9년 전 | 397 | ||
| 7913 | 9년 전 | 547 | ||
| 7912 | 9년 전 | 398 | ||
| 7911 | 9년 전 | 351 | ||
| 7910 | 9년 전 | 389 | ||
| 7909 | 9년 전 | 491 | ||
| 7908 | 9년 전 | 405 | ||
| 7907 | 9년 전 | 348 | ||
| 7906 | 9년 전 | 369 | ||
| 7905 | 9년 전 | 351 | ||
| 7904 | 9년 전 | 336 | ||
| 7903 | 9년 전 | 333 | ||
| 7902 | 9년 전 | 541 | ||
| 7901 |
|
9년 전 | 723 | |
| 7900 | 9년 전 | 559 | ||
| 7899 | 9년 전 | 363 | ||
| 7898 | 9년 전 | 368 | ||
| 7897 | 9년 전 | 326 | ||
| 7896 | 9년 전 | 345 | ||
| 7895 | 9년 전 | 453 | ||
| 7894 | 9년 전 | 368 | ||
| 7893 | 9년 전 | 315 | ||
| 7892 | 9년 전 | 362 | ||
| 7891 | 9년 전 | 746 | ||
| 7890 | 9년 전 | 1184 | ||
| 7889 | 9년 전 | 739 | ||
| 7888 |
limsy1987
|
9년 전 | 534 | |
| 7887 | 9년 전 | 526 | ||
| 7886 | 9년 전 | 418 | ||
| 7885 | 9년 전 | 387 | ||
| 7884 | 9년 전 | 392 | ||
| 7883 | 9년 전 | 383 | ||
| 7882 | 9년 전 | 419 | ||
| 7881 | 9년 전 | 423 | ||
| 7880 | 9년 전 | 545 | ||
| 7879 | 9년 전 | 443 | ||
| 7878 | 9년 전 | 1194 | ||
| 7877 | 9년 전 | 731 | ||
| 7876 | 9년 전 | 466 | ||
| 7875 | 9년 전 | 540 | ||
| 7874 |
|
9년 전 | 796 | |
| 7873 | 9년 전 | 503 | ||
| 7872 | 9년 전 | 656 | ||
| 7871 | 9년 전 | 465 | ||
| 7870 | 9년 전 | 595 | ||
| 7869 | 9년 전 | 414 | ||
| 7868 | 9년 전 | 421 | ||
| 7867 | 9년 전 | 402 | ||
| 7866 | 9년 전 | 471 | ||
| 7865 | 9년 전 | 428 | ||
| 7864 | 9년 전 | 497 | ||
| 7863 | 9년 전 | 495 | ||
| 7862 | 9년 전 | 453 | ||
| 7861 | 9년 전 | 613 | ||
| 7860 | 9년 전 | 606 | ||
| 7859 | 9년 전 | 392 | ||
| 7858 | 9년 전 | 688 | ||
| 7857 | 9년 전 | 1052 | ||
| 7856 | 9년 전 | 498 | ||
| 7855 | 9년 전 | 727 | ||
| 7854 | 9년 전 | 713 | ||
| 7853 | 9년 전 | 568 | ||
| 7852 | 9년 전 | 492 | ||
| 7851 | 9년 전 | 485 | ||
| 7850 | 9년 전 | 572 | ||
| 7849 | 9년 전 | 343 | ||
| 7848 | 9년 전 | 395 | ||
| 7847 | 9년 전 | 629 | ||
| 7846 | 9년 전 | 439 | ||
| 7845 | 9년 전 | 394 | ||
| 7844 | 9년 전 | 379 | ||
| 7843 | 9년 전 | 397 | ||
| 7842 | 9년 전 | 382 | ||
| 7841 | 9년 전 | 369 | ||
| 7840 | 9년 전 | 382 | ||
| 7839 | 9년 전 | 420 | ||
| 7838 | 9년 전 | 502 | ||
| 7837 | 9년 전 | 340 | ||
| 7836 | 9년 전 | 380 | ||
| 7835 | 9년 전 | 456 | ||
| 7834 |
|
9년 전 | 1182 | |
| 7833 | 9년 전 | 401 | ||
| 7832 | 9년 전 | 396 | ||
| 7831 | 9년 전 | 537 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기