ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค SQL - ์ƒ์œ„ n๊ฐœ ๋ ˆ์ฝ”๋“œ
ยท
DB/SQL
https://programmers.co.kr/learn/courses/30/lessons/59405 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ์ƒ์œ„ n๊ฐœ ๋ ˆ์ฝ”๋“œ ANIMAL_INS ํ…Œ์ด๋ธ”์€ ๋™๋ฌผ ๋ณดํ˜ธ์†Œ์— ๋“ค์–ด์˜จ ๋™๋ฌผ์˜ ์ •๋ณด๋ฅผ ๋‹ด์€ ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. ANIMAL_INS ํ…Œ์ด๋ธ” ๊ตฌ์กฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์œผ๋ฉฐ, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE๋Š” ๊ฐ๊ฐ ๋™๋ฌผ์˜ ์•„์ด๋”” programmers.co.kr Oracle์—์„œ ์ƒ์œ„ n๊ฐœ ๋ ˆ์ฝ”๋“œ๋งŒ ๊ฐ€์ ธ์˜ค๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ƒ๊ฐ์ด ๋‚˜์งˆ ์•Š์•˜๋‹ค. FROM ์—์„œ ์„œ๋ธŒ์ฟผ๋ฆฌ๋ฅผ ์จ์•ผ ํ–ˆ์—ˆ๋„ค.. Oracle์ด ์ต์ˆ™ํ•˜๊ธด ํ•œ๋ฐ, MySQL์ด ๋” ๊ฐ„๋‹จํ•ด๋ณด์ธ๋‹ค. Oracle WHERE rownum = n SELECT NAME FROM (S..
giraffe_
'LIMIT' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก