MySQL Search: WHERE

Source: Internet
Author: User

MySQL Specifies that search criteria can be searched using the where condition.

In the SELECT statement, the data is filtered according to the conditions specified in the Where child statement, which is given after the table name.

The product table is as follows:



A find a line with a price equal to 2.50


There are the following kinds of operators for the where statement, and with these operators you can filter the conditions accordingly:

Operator Description
= Equals
<> Not equal to
! = Not equal to
< Less than
<= Less than or equal
> Greater than
>= Greater than or equal
Between Specify a value between two

B-Character Retrieval



C Retrieve all products with a price less than 10:



D retrieving the range of values



I would like to sort the results in the search after the display, but this does not seem to be possible, may be a select after only one clause://made an obvious mistake W H e R e spelling mistakes, more xianxueniaoli13 correction!



After the condition is filtered, the Order keyword can be sorted again, which shows the powerful database function.


Related Article

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.