[ํ๋ก๊ทธ๋๋จธ์ค] ์ด๋ฆ์ el์ด ๋ค์ด๊ฐ๋ ๋๋ฌผ ์ฐพ๊ธฐ (String, Date/Oracle(SQL))
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์ด ๋ค์ด์์ผ๋ฉด ๊ฐ์ ธ์ค๋ ๊ฒ์ผ๋ก ํ๋ค.
[MongoDB] MongoDB Terms, query corresponding to SQL (0) | 2022.01.19 |
---|---|
[ํ๋ก๊ทธ๋๋จธ์ค] ์ค์ฑํ ์ฌ๋ถ ํ์ ํ๊ธฐ (String, Date/Oracle(SQL)) (0) | 2021.03.03 |
[ํ๋ก๊ทธ๋๋จธ์ค] ๋ฃจ์์ ์๋ผ ์ฐพ๊ธฐ (SQL String, Date / Oracle) (0) | 2021.02.16 |
[HackerRank] The Report (SQL/JOIN) (0) | 2021.02.06 |
[HackerRank] Average Population of Each Continent (SQL/JOIN) (0) | 2021.02.01 |