08-SQLite in, between, alias, 08-sqlitealias

Source: Internet
Author: User

08-SQLite in, between, alias, 08-sqlitealias
I. in operator Overview

The IN operator allows us to specify multiple values IN the WHERE clause.
Syntax: select column_name from table_name where column_name in (value1, value2 ,...);
Example 1: Search for lucy and bob data in the name column from the persons table.

2. between Operator
The between operator... and selects a data range between two values. These values can be numerical values, text values, or dates.
Syntax: select column_name from table_name where column_name between value1 and value2
Example 1: Select data information in the name column from persons in alphabetical order between "bob" and "com"

Example 2: select the data information in the id column from pesons in numerical order between 2 and 3


Iii. alias Operators
You can specify an alias for the column name and table name.
Syntax: select column_name as alias_name from table_name;
Example 1: Set the name in the persons table to alias_name.


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.