Oracle之NULL IS NULL

來源:互聯網
上載者:User

NULL 大於/小於/等於/不等於 任何值(包括NULL本身),有且僅有:NULL IS NULL

SQL> set serveroutput on<br />SQL><br />SQL> BEGIN<br /> 2 IF (2 > NULL)<br /> 3 THEN<br /> 4 dbms_output.put_line('>');<br /> 5 ELSIF (2 < NULL)<br /> 6 THEN<br /> 7 dbms_output.put_line('<');<br /> 8 ELSIF (2 = NULL)<br /> 9 THEN<br /> 10 dbms_output.put_line('=');<br /> 11 ELSIF (2 != NULL)<br /> 12 THEN<br /> 13 dbms_output.put_line('!=');<br /> 14 ELSE<br /> 15 dbms_output.put_line('Unknown!');<br /> 16 END IF;<br /> 17<br /> 18 IF (NULL = NULL)<br /> 19 THEN<br /> 20 dbms_output.put_line('NULL = NULL');<br /> 21 ELSIF (NULL != NULL)<br /> 22 THEN<br /> 23 dbms_output.put_line('NULL != NULL');<br /> 24 ELSIF (NULL IS NULL)<br /> 25 THEN<br /> 26 dbms_output.put_line('NULL IS NULL');<br /> 27 ELSE<br /> 28 dbms_output.put_line('UNKNOWN!!');<br /> 29 END IF;<br /> 30 END;<br /> 31 /</p><p>Unknown!<br />NULL IS NULL</p><p>PL/SQL procedure successfully completed</p><p>SQL>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.