×ðÁú¿­Ê±¹ÙÍøµÇ¼

sqlÖÐwhereºóÔõô¼ÓÁ½¸öand

ÊǵÄ £¬¿ÉÒÔÔÚ sql ÖÐµÄ where ×Ó¾äÖÐʹÓöà¸ö and Ìõ¼þ¡£ÕâÊÇÓï·¨£ºwhere condition1 and condition2 and … conditionn¡£Ã¿¸öÌõ¼þ½«½øÒ»²½É¸Ñ¡Êý¾Ý £¬Ö»·µ»Øͬʱ֪×ãËùÓÐÌõ¼þµÄÐС£

SQL ÖÐ where ºóÌí¼Ó¶à¸ö AND Ìõ¼þ

ÔÚ SQL ÖÐ £¬WHERE ×Ó¾äÓÃÓÚ¹ýÂ˱íÖеÄÊý¾Ý £¬·µ»ØÖª×ãÖ¸¶¨Ìõ¼þµÄÐС£ÒªÌí¼Ó¶à¸ö AND Ìõ¼þ £¬¿ÉÒÔʹÓÃÒÔÏÂÓï·¨£º

WHERE condition1 AND condition2 AND ... conditionN

µÇ¼ºó¸´ÖÆ

¾ÙÀý£º

¼ÙÉèÎÒÃÇÓÐÒ»ÕÅÃûΪ “customers” µÄ±í £¬ÆäÖаüÀ¨ÒÔÏÂÁУº

id

name

age

city

Òª²éÕÒËùÓÐ 25 ËêÒÔÉÏ £¬ÆÜÉíÔÚ “New York” ÊеĿͻ§ £¬¿ÉÒÔʹÓÃÒÔÏÂÅÌÎÊ£º

SELECT *
FROM customers
WHERE age > 25 AND city = 'New York';

µÇ¼ºó¸´ÖÆ

ÔÚÕâ¸öÅÌÎÊÖÐ £¬ÎÒÃÇʹÓÃÁËÁ½¸ö AND Ìõ¼þ£º

age > 25£ºÉ¸Ñ¡³öÄêËê´óÓÚ 25 µÄ¿Í»§¡£

city = ‘New York’£ºÉ¸Ñ¡³öÆÜÉíÔÚ “New York” ÊеĿͻ§¡£

Öª×ãÕâÁ½¸öÌõ¼þͬʱ½¨ÉèµÄ¿Í»§»á±»·µ»ØΪЧ¹û¡£

ÒÔÉϾÍÊÇsqlÖÐwhereºóÔõô¼ÓÁ½¸öandµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ