Page 294 - Nodejs 교과서 개정2판
P. 294

ౠ੿ ஸۢ݅ ઑഥೡ ࣻب ੓णפ׮  ઑഥܳ ਗೞח ஸۢਸ SELECT ׮਺ী ֍ਵݶ ؾפ׮  ੉ܴҗ Ѿഒ ৈࠗ݅ ઑ

         ഥೞҊ र׮ݶ ׮਺җ э੉ ೤פ׮

          콘솔

           mysql>	SELECT	name,	married	FROM	nodejs.users;
           +------+---------+
           |	name	|	married	|
           +------+---------+
           |	zero	|							0	|
           |	nero	|							1	|
           +------+---------+
           2	rows	in	set	(0.00	sec)




         WHERE ੺ਸ ࢎਊೞݶ ౠ੿ ઑѤਸ о૓ ؘ੉ఠ݅ ઑഥೡ ࣻب ੓णפ׮  ׮਺਷ Ѿഒਸ ೮Ҋ ա੉о   ࣁ ੉࢚ੋ
         ࢎਊ੗ܳ ઑഥೞח 42-ޙੑפ׮  AND۽ ৈ۞ ઑѤਸ ޘয઴ ࣻب ੓णפ׮


          콘솔
           mysql>	SELECT	name,	age	FROM	nodejs.users	WHERE	married	=	1	AND	age	>	30;
           +------+-----+
           |	name	|	age	|
           +------+-----+
           |	nero	|		32	|
           +------+-----+
           1	row	in	set	(0.00	sec)




         ANDо ઑѤٜਸ ݽف ݅઒ೞח ؘ੉ఠܳ ଺ח׮ݶ ORח ઑѤٜ ઺ যו ೞաۄب ݅઒ೞח ؘ੉ఠܳ ଺णפ׮


          콘솔
           mysql>	SELECT	id,	name	FROM	nodejs.users	WHERE	married	=	0	OR	age	>	30;
           +----+------+
           |	id	|	name	|
           +----+------+
           |	1		|	zero	|
           |	2		|	nero	|
           +----+------+
           2	rows	in	set	(0.01	sec)




         ORDER BY [컬럼명]	[ASC|DESC] ఃਕ٘ܳ ࢎਊೞݶ ੿۳ب оמ೤פ׮  ա੉о ݆਷ ࣽࢲ؀۽ ੿۳೧ࠁѷणפ

         ׮  DESCח ղܿରࣽ  ASCח য়ܴରࣽ੉޲۽ %&4$ܳ ࢎਊೞݶ ؾפ׮

          콘솔
   289   290   291   292   293   294   295   296   297   298   299