SQL multi-condition query

Source: Internet
Author: User
To implement multi-condition query, if the value is 0, it is not limited to any conditions. how can I use SQL? for example, if a certain type of store in a region is not limited to a Chinese query, the where Region value is not required, but only the where type of Chinese food, select the region as Beijing type for Chinese food query on... to implement multi-condition query, if the value is 0, how can I use SQL to implement unlimited conditions?

For example, to query a certain type of shops in a certain region, if the region is not limited to Chinese food, you do not need where region = value, but only where Type = Chinese food, if you select "Beijing" as "Chinese food", the query result is "where" = "Beijing AND" = "Chinese food.

There are also many other conditions. it is too complicated to query different SQL statements after using if else at the backend. I don't know much about SQL, but I think there should be corresponding solutions for SQL.

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.