The LIKE operator of 07-sqlite

Source: Internet
Author: User

I. Overview of like
The like
operator is used to search for the specified pattern syntax in a column in a where sentence : Select column_name (S ) from table_name where column_name like pattern;
second, from the persons table, select addr with "s" Beginning data information
Syntax: SELECT * from persons where addr like ' s% '; Note: The% number above is a wildcard character (the missing part of the pattern), as long as the first letter is S

third, from the persons table, select addr with "J" End of the data information
Syntax: Select id,addr from persons where addr like '%j ';

Iv. Select data information from the persons table that contains "Z" in the addr
Syntax: SELECT * from persons where addr like '%z% ';

v. Select addr Data information from the persons table that does not contain "Z"
Syntax: SELECT * from persons where addrdon't like'%z% ' ;

The LIKE operator of 07-sqlite

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.