DQL data Query Language of data storage--sqlite statement

Source: Internet
Author: User
Tags sqlite

A. SELECT statement

Format: Select field contents from table name

1. Field List

1-* all fields

2-comma interval list of field names

3-Specify aliases with AS (can be omitted)

2.DISTINCT de-duplication: DISTINCT Field List

Two. where query criteria

1.is null/is NOT NULL to determine NULL/non-NULL

2.like Fuzzy comparison string

1-wildcard characters

1>% any number of characters

2>_ single character

2-Usage

1>like '% condition '

2>like ' Condition% '

3>like '% condition% '

4>like ' _ Condition _ '

5>like ' Conditions _ '

6>like ' _ Condition '

3.in determine if the value is within the list

1-and equivalent to a single field or operation

2-Usage

1> field name in (value 1, value 2 ...) )

2> field name in (subquery statement)

4.between and between the start and end values

1-between start value and end value

2-both front and rear included

3-equivalent To field >= start value and field <= end value

4-Used in numeric, time

5-Start value <= End value

4. Features

1-adding filters to the result set, returning records that match the criteria

2-follows the From table name

Three. Order by sort

1. Usage

1-order by field 1 ase/desc, Field 2 ...

2-order by Field ordinal (starting from 1)

3-order by Field Alias

4-order by field op-expression

2.ASC Ascending: Default value

3.desc Descending

4. Principle: Priority before, if the previous data is consistent, then sort by the following fields

Four. GROUP BY group

1. Usage

1-group by Field List

2-having filtering records on a group basis

DQL data Query Language of data storage--sqlite statement

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.