Page 295 - Nodejs 교과서 개정2판
P. 295
mysql> SELECT id, name FROM nodejs.users ORDER BY age DESC;
+----+------+
| id | name |
+----+------+
| 2 | nero |
| 1 | zero |
+----+------+
2 rows in set (0.01 sec)
ઑഥೡ ۽ ѐࣻܳ ࢸೡ ࣻب णפ LIMIT [숫자] ఃਕ٘ܳ ࢎਊפ ೞա݅ ઑഥೞ۰ݶ LIMIT 1ਸ 4
2-ޙ ী ࠢݶ ؾפ
콘솔
mysql> SELECT id, name FROM nodejs.users ORDER BY age DESC LIMIT 1;
+----+------+
| id | name |
+----+------+
| 2 | nero |
+----+------+
1 row in set (0.00 sec)
۽ ѐࣻܳ ࢸೞݶࢲ ݻ ѐܳ Ѥցڬ ࢸೡ ࣻب णפ ח ѱद౸ ١ ಕ֎࣌ ӝמਸ ҳഅೡ
ٸ ਬਊפ ܳ ٜয ߣ૩ ಕীࢲ _ ߣ ѱदޛਸ ઑഥ೮ݶ ف ߣ૩ ಕীࢲח _ ߣ ѱ
दޛਸ ઑഥ೧ঠ פ ٸ ѐܳ ѤցڪҊ ѐ ѱदޛਸ ઑഥೞۄח ध ݺ۸ оמפ
OFFSET [건너뛸 숫자] ఃਕ٘ܳ ࢎਊפ
콘솔
mysql> SELECT id, name FROM nodejs.users ORDER BY age DESC LIMIT 1 OFFSET 1;
+----+------+
| id | name |
+----+------+
| 1 | zero |
+----+------+
1 row in set (0.00 sec)
৻ীب ݆ ఃਕ٘о ݅ ب݅ ঌݶ খਵ۽ ઁܳ ҳഅೞӝী ࠙פ
/PUF ਕ߮ ࢎਊ द
ীࢲ ֍؍ ؘఠٜਸ ࣚऔѱ ഛੋೡ ࣻ णפ ઑഥೞӡ ਗೞח ప࠶ী ݃झ ழࢲܳ ৢܽ റ ࣁ ߣ૩ ই