Oracle where語句中and,or,not的執行順序

來源:互聯網
上載者:User

Oracle where子句裡面的and,or,not:

1.a and b(順序執行)

      (1)a,b同true則true,

      (2)a,b一false則false,

         [1]若a為false,就沒有必要在進行後面的判斷了,整個運算式必為false;

         [2]若a為true,則進行後面的判斷,b為true則運算式為true,若b為false,則整個運算式為false;

2. a or b(順序執行)

       (1)a,b一true則true

          [1]若a為true,就沒必要在進行判斷了,運算式為true;

          [2]若a為false,繼續判斷b,若b為false,運算式為false;若b為true,則運算式為true;

       (2)a,b同false則運算式返回false

          此情況下,a為false,然後b也為false;

3.not a(先執行a,在取反)

      取反

      a->true, not a->false;

      a->false, not a->true;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.