sqlÖÐand¿ÉÒÔÁ¬ÓÃÂð
Êǵģ¬sql ÖÐµÄ and ¿ÉÒÔÁ¬Óá£and ÔËËã·ûÓÃÓÚ×éºÏ¶à¸öÌõ¼þ£¬ÇÒÖ»Óе±ËùÓÐÌõ¼þ¶¼ÎªÕæʱ£¬ÅÌÎʲŻ᷵»ØЧ¹û¡£Á¬Óà and ÔËËã·û¿ÉÒÔ½¨Éè¸üÖØ´óµÄ¹ýÂËÌõ¼þ£¬Ìṩ¸ü׼ȷµÄ¹ýÂË¡¢¸ü¸ßµÄ¿É¶ÁÐÔºÍDZÔÚµÄÐÔÄÜÓÅ»¯¡£
SQL ÖÐ AND ¿ÉÒÔÁ¬ÓÃÂð£¿
»Ø¸²£º ÊÇ£¬AND ¿ÉÒÔÁ¬Óá£
Õö¿ª£º
ÔÚ SQL ÅÌÎÊÖУ¬AND ÔËËã·ûÓÃÓÚ×éºÏ¶à¸öÌõ¼þ£¬ÕâÒâζ×ÅÖ»Óе±ËùÓÐÌõ¼þ¶¼ÎªÕæʱ£¬ÅÌÎʲŷµ»ØЧ¹û¡£AND ÔËËã·û¿ÉÒÔƾ֤ÐèÒªÁ¬ÓÃÒ»ÔÙ£¬ÒÔ½¨Éè¸üÖØ´óµÄ¹ýÂËÌõ¼þ¡£
ÀýÈ磺
SELECT * FROM users WHERE age > 25 AND gender = 'male' AND city = 'New York';
µÇ¼ºó¸´ÖÆ
ÔÚÕâ¸öÅÌÎÊÖУ¬AND ÔËËã·û±»Á¬ÓÃÁËÈý´Î£¬À´É¸Ñ¡³öÄêËê´óÓÚ 25 Ëê¡¢ÐÔ±ðΪÄÐÐÔ¡¢×¡ÔÚŦԼµÄÄÐÐÔÓû§¡£
Á¬Óà AND ÔËËã·ûµÄÓŵ㣺
¸ü׼ȷµÄ¹ýÂË£ºÁ¬Óà AND ÔËËã·û¿ÉÒÔ½¨ÉèºÜÊÇ׼ȷµÄ¹ýÂËÌõ¼þ£¬½ö·µ»ØÍêÈ«ÇкÏËùÓÐÌõ¼þµÄЧ¹û¡£
¿É¶ÁÐԸߣºÁ¬Óà AND ÔËËã·ûʹµÃÅÌÎʸüÈÝÒ×ÔĶÁºÍÃ÷È·£¬ÓÉÓÚËüÇåÎúµØÅú×¢ÎúËùÓÐÌõ¼þµÄ¹Øϵ¡£
ÐÔÄÜÓÅ»¯£ºÔÚijЩÇéÐÎÏ£¬Á¬Óà AND ÔËËã·û¿ÉÒÔÓÅ»¯ÅÌÎÊÐÔÄÜ£¬ÓÉÓÚËüÔÊÐíÊý¾Ý¿âÒýÇæ¸üÓÐÓõعýÂ˼ͼ¡£
ÒÔÉϾÍÊÇsqlÖÐand¿ÉÒÔÁ¬ÓÃÂðµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡