์ƒ์„ธ ์ปจํ…์ธ 

๋ณธ๋ฌธ ์ œ๋ชฉ

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ์ด๋ฆ„์— el์ด ๋“ค์–ด๊ฐ€๋Š” ๋™๋ฌผ ์ฐพ๊ธฐ (String, Date/Oracle(SQL))

PROGRAMMING/Database

by koharin 2021. 3. 3. 17:57

๋ณธ๋ฌธ

728x90
๋ฐ˜์‘ํ˜•

๐Ÿ’ป Oracle ์ œ์ถœ์ฝ”๋“œ


SELECT ANIMAL_ID, NAME
FROM ANIMAL_INS
WHERE ANIMAL_TYPE = 'Dog' AND UPPER(NAME) LIKE '%EL%'
ORDER BY NAME;

๋Œ€์†Œ๋ฌธ์ž๋ฅผ ๊ตฌ๋ถ„ํ•˜์ง€ ์•Š๊ณ  ์ด๋ฆ„์— 'EL'์ด ํฌํ•จ๋œ ANIMAL_TYPE์ด 'Dog'์ธ ๋™๋ฌผ์˜ ANIMAL_ID์™€ NAME์„ NAME ์ˆœ์œผ๋กœ ์กฐํšŒํ•œ๋‹ค.

'el', 'eL', 'El', 'EL' ์ด๋ ‡๊ฒŒ ๊ฐ€๋Šฅํ•œ๋ฐ, ๊ทธ๋ƒฅ NAME์„ ๋ชจ๋‘ ๋Œ€๋ฌธ์ž๋กœ ๋ฐ”๊ฟ”์„œ EL์ด ๋“ค์–ด์žˆ์œผ๋ฉด ๊ฐ€์ ธ์˜ค๋Š” ๊ฒƒ์œผ๋กœ ํ–ˆ๋‹ค.

728x90
๋ฐ˜์‘ํ˜•

๊ด€๋ จ๊ธ€ ๋”๋ณด๊ธฐ