Data Type in SQLite-Basic SQLite tutorial (2)

Source: Internet
Author: User
Tags sqlite tutorial

To use a database, you must first find out its data type, isn't it? SQLite data type and its simplicity:

  • Null. Null

  • Integer. Integer

  • Real. Floating Point Type

  • Text. Text Type

  • Blob. Binary type, used to store files.

The above is the SQLite storage type. Of course, each type has a different sub-type based on the data length. This is not mentioned now, because you can directly use these big types. You know the types. In the future, you will be familiar with it in practical use.

SQLite does not require you to declare the Data Type in advance. In actual stored procedures, it will automatically convert data based on the actual type. However, we do not recommend non-datatype to improve efficiency.

The following is a code for creating a table. It mainly helps you understand the practical use of data types:

Create Table student (Name text, // name no integer, // student ID totalscore real, // total score photo blob // photo );

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.