SQL Server string Common functions

Source: Internet
Author: User
Tags lowercase

1. Left returns the number of characters in the string that are specified in the beginning.
SELECT left (' ABCDEFG ', 2);----AB2. Right returns the specified number of characters in the string starting from the left.SELECT Right (' ABCDEFG ', 2);----FG3.LEN return string lengthSELECT LEN (' ABCDEFG ');
----7SELECT LEN (' ABCDEFG ');
----8SELECT LEN (' a bcdefg ');
----8SELECT LEN (' ABCDEFG ');
----74.LOWER returns the lowercase form of an uppercase stringSELECT LOWER (' ABCDEFG ');
----ABCDEFG5.UPPER returns the uppercase form of a lowercase stringSELECT UPPER (' ABCDEFG ');
----ABCDEFG6.LTRIM returns the left whitespace form of the stripped stringSELECT LTRIM (' ABCDEFG ');
----ABCDEFG

SQL Server string Common functions

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.