특정 컬럼에서 소문자 데이터 조회하기
페이지 정보
작성자 서방님 댓글 0건 조회 140회 작성일 15-09-17 14:59본문
SELECT * FROM my_table
WHERE some_field
For your requirement, try the following queries. I've just used "product_name" as the tbale name and "name" as the column name
1) Find product names start with an upper case character
select * from product_name where
LEFT(name,1) = UPPER(LEFT(name,1)) COLLATE Latin1_General_CS_AS
2) Find product names start with an lower case character
select * from product_name where
LEFT(name,1) = LOWER(LEFT(name,1)) COLLATE Latin1_General_CS_AS
참고 : http://blog.sqlauthority.com/2007/04/30/case-sensitive-sql-query-search/
댓글목록
등록된 댓글이 없습니다.