[Query Statement]--mysql query statement Knowledge points Summary

Source: Internet
Author: User
Tags mysql query

1. Query fields
#查询所有字段
#查询指定字段

2. Querying a specified record (where condition expression)
#比较
#指定范围
#指定集合
#匹配字符
#查询空值
#带IN关键字的集合查询
range Query #带BETWEEN and keyword
#带LIKE的字符匹配查询
#带AND | Multi-criteria query for or

3. Further operation of the query results
#distinct查询结果不重复
sort #order by Query results
#limit限制查询结果数目与指定初始位置
#union合并查询结果

4. Aggregate Functions
#count ()
#sum ()
#avg ()
#max ()
#min ()

5. Packet Query (group BY)
#group by + group_concat ()
#group by + aggregate function
#group by + have
#group by + with rollup

6. Connection Query
#内连接查询
#外连接查询
|--> left connection query
|--> Right Connection query
#复合条件的连接查询

7. Sub-query
#带IN的子查询
#带比较运算符的子查询
#带exists的子查询
#带any的子查询
#带all的子查询

8. Alias tables and Fields

9. Using Regular expression Queries
#查询以特定字符 (String) record at the beginning
record at the end of a #查询以特定字符 (string)
#使用 "." or "*" or "+" to match 1 or more characters
#匹配指定字符 (String)
#{m,n} match string consecutive occurrences

[Query Statement]--mysql query statement Knowledge points Summary

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.