The meaning of SQL Server four matching characters

Source: Internet
Author: User
Tags range

The meaning of the four matches is 0 or more any character representing an arbitrary character [] any single character within the specified range [^] a string with a match in any single character that is not in the specified range must be enclosed in quotation marks. For example, the following example: Like ' br% ' returns to "BR" The beginning of any string. Like ' br% ' returns any character that starts with "Br". Like '%een ' returns any string that ends with "een". Like '%en% ' returns any string containing "en". Like ' en ' returns a string of three characters ending with "en". Like ' [ck]% ' returns any string that starts with "C" or "K".  Like ' [S-v]lng ' returns a string of four characters, ending with "ing," which begins with an ' m[^c]% ' to return an arbitrary string starting with "M" and the second character is not "C". Note: Using the LIKE operator usually causes SQL Server to not use the index associated with the given table. It tells SQL Server to compare the specified string and find any content that matches the provided matching character. Because of this, it is not recommended to use this type of search or comparison on large tables, or at least to remind users that it is important for the system to find the waiting time required to meet the criteria for searching data rows.
--------------------------------------------------------------------------------

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.