Notes on the SUBSTR function of SQLite

Source: Internet
Author: User
Tags sqlite query

Official Reference Document: SQLite Query language:core Functions http://www.sqlite.org/lang_corefunc.html

To test the SQL statement:

SELECTSubstr'2012-12-12 10:11:12 FFF',0, -) asSubstr_0_20,substr ('2012-12-12 10:11:12 FFF',0, +) asSubstr_0_19,substr ('2012-12-12 10:11:12 FFF',1, +) asSubstr_1_19,substr ('2012-12-12 10:11:12 FFF', +) asSubstr_19

Test statement result: Substr_0_20 and substr_1_19 results are consistent;substr_0_19 don't know why one less?

Substr_0_20 Substr_0_19 Substr_1_19 Substr_19
2012-12-12 10:11:12 2012-12-12 10:11:1 2012-12-12 10:11:12 2 FFF

After a colleague's test, substr_0_20 can't get normal results on iOS.

Notes on the SUBSTR function of 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.