The SQL condition is null for all queries, not NULL by criteria queries, and multi-criteria filter queries.

Source: Internet
Author: User
Procedure Querylacklonorlattdcell (I_region_name varchar2, i_state varchar2) isbegin  Select Region_name, state From    gc3_td_site_history   where 1 = 1 and     region_name =         decode (i_region_name, NULL, Region_name, i_ Region_name)     and InStr (decode (i_state, NULL, State, i_state), state) > 0;end;

If I_region_name is null, all region_name are queried; otherwise press I_region_name query.

If i_state is null, all state is queried, and if I_state is "State1,state2", it is equivalent to state in (STATE1,STATE2);

The SQL condition is null for all queries, not NULL by criteria queries, and multi-criteria filter queries.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.