When you create a database table using Sqlite3, you need to be aware

Source: Internet
Author: User
Tags naming convention

When you create a database table using Sqlite3, you need to be aware that:

1. Cannot use pure digital

2. Cannot have characters such as "-", "@". It cannot begin with a number.


One, the following is the log information:

DB error:1 "Unrecognized token:" 47464636265757265763393573649 ""

DB Query:insert into 47464636265757265763393573649 (role,number,name) VALUES (?,?,?)

In fact. I want to use 47464636265757265763393573649 as an indication. In fact, it doesn't work.cannot be a purely numeric

Two, the following log, I want to use the date as the table name.

DB error:1 "near": Syntax Error "

DB Query:insert into 2014-11-01-02:18:0054 (role,number,name) VALUES (?,?,?)

stating "-" It's not going to work.

Three, below the log. I want to use the URI as the table name:

DB error:1 "near": Chat0015453d2792ef ": Syntax Error"

DB Query:insert into Sip:[email protected] (Role,number,name) VALUES (?

,?,?

)

That means @ is not going to work.

It is possible that the bottom of the sqlite3 is to program the table name as the class name. Because the table naming convention is the same as the rule of the variable

When you create a database table using Sqlite3, you need to be aware

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.