너무 궁금해서 아무리 찾아도 저와 비슷한 질문을 한 사람이 없더군요. 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년 전
감사합니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8030 | 9년 전 | 399 | ||
| 8029 | 9년 전 | 323 | ||
| 8028 | 9년 전 | 282 | ||
| 8027 | 9년 전 | 291 | ||
| 8026 | 9년 전 | 361 | ||
| 8025 | 9년 전 | 401 | ||
| 8024 | 9년 전 | 365 | ||
| 8023 | 9년 전 | 409 | ||
| 8022 | 9년 전 | 328 | ||
| 8021 | 9년 전 | 344 | ||
| 8020 | 9년 전 | 338 | ||
| 8019 | 9년 전 | 358 | ||
| 8018 | 9년 전 | 460 | ||
| 8017 | 9년 전 | 548 | ||
| 8016 | 9년 전 | 360 | ||
| 8015 | 9년 전 | 405 | ||
| 8014 | 9년 전 | 338 | ||
| 8013 | 9년 전 | 255 | ||
| 8012 | 9년 전 | 261 | ||
| 8011 | 9년 전 | 460 | ||
| 8010 | 9년 전 | 316 | ||
| 8009 | 9년 전 | 325 | ||
| 8008 | 9년 전 | 301 | ||
| 8007 | 9년 전 | 446 | ||
| 8006 | 9년 전 | 485 | ||
| 8005 |
|
9년 전 | 982 | |
| 8004 | 9년 전 | 371 | ||
| 8003 | 9년 전 | 439 | ||
| 8002 | 9년 전 | 334 | ||
| 8001 |
|
9년 전 | 681 | |
| 8000 | 9년 전 | 436 | ||
| 7999 | 9년 전 | 393 | ||
| 7998 | 9년 전 | 449 | ||
| 7997 | 9년 전 | 322 | ||
| 7996 | 9년 전 | 553 | ||
| 7995 | 9년 전 | 488 | ||
| 7994 | 9년 전 | 361 | ||
| 7993 | 9년 전 | 425 | ||
| 7992 | 9년 전 | 530 | ||
| 7991 | 9년 전 | 273 | ||
| 7990 | 9년 전 | 305 | ||
| 7989 | 9년 전 | 319 | ||
| 7988 | 9년 전 | 746 | ||
| 7987 | 9년 전 | 450 | ||
| 7986 | 9년 전 | 447 | ||
| 7985 | 9년 전 | 523 | ||
| 7984 | 9년 전 | 445 | ||
| 7983 | 9년 전 | 686 | ||
| 7982 | 9년 전 | 548 | ||
| 7981 | 9년 전 | 499 | ||
| 7980 | 9년 전 | 521 | ||
| 7979 | 9년 전 | 507 | ||
| 7978 | 9년 전 | 479 | ||
| 7977 | 9년 전 | 417 | ||
| 7976 | 9년 전 | 872 | ||
| 7975 | 9년 전 | 384 | ||
| 7974 | 9년 전 | 414 | ||
| 7973 | 9년 전 | 621 | ||
| 7972 | 9년 전 | 401 | ||
| 7971 | 9년 전 | 472 | ||
| 7970 | 9년 전 | 322 | ||
| 7969 | 9년 전 | 558 | ||
| 7968 | 9년 전 | 398 | ||
| 7967 | 9년 전 | 389 | ||
| 7966 | 9년 전 | 396 | ||
| 7965 |
|
9년 전 | 1031 | |
| 7964 | 9년 전 | 419 | ||
| 7963 | 9년 전 | 427 | ||
| 7962 | 9년 전 | 413 | ||
| 7961 |
전갈자리남자
|
9년 전 | 520 | |
| 7960 | 9년 전 | 987 | ||
| 7959 | 9년 전 | 565 | ||
| 7958 | 9년 전 | 425 | ||
| 7957 | 9년 전 | 377 | ||
| 7956 | 9년 전 | 377 | ||
| 7955 | 9년 전 | 475 | ||
| 7954 | 9년 전 | 404 | ||
| 7953 | 9년 전 | 452 | ||
| 7952 | 9년 전 | 378 | ||
| 7951 | 9년 전 | 516 | ||
| 7950 | 9년 전 | 410 | ||
| 7949 | 9년 전 | 398 | ||
| 7948 | 9년 전 | 339 | ||
| 7947 | 9년 전 | 950 | ||
| 7946 | 9년 전 | 460 | ||
| 7945 | 9년 전 | 416 | ||
| 7944 | 9년 전 | 458 | ||
| 7943 | 9년 전 | 400 | ||
| 7942 | 9년 전 | 419 | ||
| 7941 | 9년 전 | 412 | ||
| 7940 | 9년 전 | 911 | ||
| 7939 | 9년 전 | 381 | ||
| 7938 | 9년 전 | 414 | ||
| 7937 | 9년 전 | 303 | ||
| 7936 | 9년 전 | 898 | ||
| 7935 | 9년 전 | 478 | ||
| 7934 | 9년 전 | 444 | ||
| 7933 | 9년 전 | 555 | ||
| 7932 | 9년 전 | 518 | ||
| 7931 | 9년 전 | 570 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기