Mysql must know will read notes the sixth chapter of the filter data _mysql

Source: Internet
Author: User

Introduction to MySQL

MySQL is an open source relational database management system (RDBMS), the MySQL database system uses the most commonly used database management language-Structured Query Language (SQL) for database management.

The location of the WHERE clause, which causes an error when the order by and the WHERE clause are used simultaneously should be placed behind the where.

1. Mismatch check

Copy Code code as follows:

SELECT vend_id from the products where vend_id <>1003

Equal to

Copy Code code as follows:

SELECT vend_id from the products where vend_id! =1003

2. Scope check

To check for a range of values, you can use the between operator. Its syntax differs slightly from the operators of other where clauses, because it requires two values. Used to retrieve prices and dates.

Copy Code code as follows:

SELECT Prod_name,prod_price from the products WHERE Prod_price BETWEEN 5 and 10;

3. Null value Check

NULL no value (no), which is different from the field containing 0, an empty string, or a space that contains only spaces.

Copy Code code as follows:

SELECT * FROM Products
where Prod_price is Null;

The above is a small set for everyone to share the MySQL must know will read the sixth chapter of the filter data related content, I hope to help you!

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.