NULLIF é¢æ°ã£ã¦åä½ã®èª¬æã¯å¤ããã©ããããä½ã«ä½¿ãã°ããã®ãã£ã¦ããã¾ãç解ããã¦ãªãããããªããã¨æãã ã£ã¦ãã¨ã§ãNULLIF é¢æ°ã®å®ç¨çãªä½¿ãæ¹ãããã¤ãç´¹ä»ããã NULLIF é¢æ°ã®åä½ ã¾ãã¯ãNULLIF é¢æ°ã®åä½ããã NULLIF é¢æ°ã¯å¼æ°ã 2 ã¤ã¨ã£ã¦ãå¼æ°ãçããå ´åã« NULL ãè¿ããç°ãªãå ´åã«ç¬¬ä¸å¼æ°ãè¿ãã ãã®ãåä½èªä½ã¯ããªãç°¡åãªé¢æ°ã ä¾ãã°ã SELECT col_a, col_b, NULLIF(col_a, col_b) FROM SomeTable; ãããå®è¡ããã¨ã次ã®ãããªçµæãå¾ãããã col_a col_b NULLIF(col_a, col_b) 10 10 NULL 10 0 10 0 10 0 NULL NULL NULL ã¾ããããã°ã©ãã®ããã®SQL 第2çã§ã¯ãCASE å¼ãç¨ãã¦ã NULLIF(V1
{{#tags}}- {{label}}
{{/tags}}