ÔÚsqlÖбí´ïij¸öÊôÐÔΪ¿ÕµÄº¯Êý
ÓÃÓÚ±í´ïÊôÐÔΪ¿ÕµÄ sql º¯ÊýÊÇ is null¡£Ëü¼ì²éij¸öÊôÐÔµÄÖµÊÇ·ñΪ null£¬²¢·µ»Ø true£¨Îª¿Õ£©»ò false£¨²»Îª¿Õ£©¡£is null ¿ÉÓëÆäËûÔËËã·ûÍŽáʹÓã¬Èç not is null£¨²»Îª¿Õ£©ºÍ is null or attribute_name = ”£¨Îª¿Õ»òΪ¿Õ×Ö·û´®£©¡£¸Ãº¯Êý¶Ô null ÖµÃô¸Ð£¬ÓÐÖúÓÚÈ·±£Êý¾ÝÍêÕûÐÔ¡£
ÔÚ SQL Öбí´ïÊôÐÔΪ¿ÕµÄº¯Êý
ʲôº¯Êý¿ÉÒÔ±í´ïÊôÐÔΪ¿Õ£¿
ÓÃÓÚ±í´ïÊôÐÔΪ¿ÕµÄ SQL º¯ÊýÊÇ IS NULL¡£
ÔõÑùʹÓà IS NULL º¯Êý£¿
IS NULL º¯ÊýÓÃÓÚ¼ì²éij¸öÊôÐÔµÄÖµÊÇ·ñΪ¿Õ£¨¼´Îª NULL£©¡£ËüµÄÓï·¨ÈçÏ£º
IS NULL(attribute_name)
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬attribute_name ÊÇÒª¼ì²éÆäÊÇ·ñΪ¿ÕµÄÊôÐÔÃû¡£
IS NULL º¯ÊýÔõÑùÊÂÇ飿
IS NULL º¯Êý·µ»ØÒ»¸ö²¼¶ûÖµ£ºTRUE ÌåÏÖÊôÐÔΪ¿Õ£¬FALSE ÌåÏÖÊôÐÔ²»Îª¿Õ¡£ÀýÈ磺
SELECT * FROM table_name WHERE attribute_name IS NULL;
µÇ¼ºó¸´ÖÆ
´ËÅÌÎʽ«·µ»Ø table_name ±íÖÐËùÓÐÊôÐÔ attribute_name Ϊ¿ÕµÄÐС£
ÆäËûʹÓÃÒªÁ죺
IS NULL º¯ÊýÒ²¿ÉÒÔÓëÆäËûÂß¼ÔËËã·ûÍŽáʹÓá£ÀýÈ磺
NOT IS NULL ¼ì²éÊôÐÔÊÇ·ñ²»Îª¿Õ¡£
IS NULL OR attribute_name = ” ¼ì²éÊôÐÔÊÇ·ñΪ¿Õ»òΪ¿Õ×Ö·û´®¡£
×¢ÖØÊÂÏ
IS NULL º¯Êý¶Ô NULL ÖµÃô¸Ð£¬ÕâÒâζ×ÅËüÖ»Äܼì²é NULL Öµ£¬¶ø²»¿É¼ì²éÆäËûÀàÐ͵ĿÕÖµ£¬ÀýÈç¿Õ×Ö·û´®»ò 0¡£
IS NULL º¯Êý¹ØÓÚÈ·±£Êý¾ÝÍêÕûÐԺʹ¦Öóͷ£È±Ê§ÖµºÜÊÇÓÐÓá£
ÒÔÉϾÍÊÇÔÚsqlÖбí´ïij¸öÊôÐÔΪ¿ÕµÄº¯ÊýµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡