When using sqlite3 to create database tables, note that the sqlite3 Database
Note the following when using sqlite3 to create a database table:
1. Cannot use pure numbers
2. It cannot contain "-", "@", and other characters. Cannot start with a number.
1. The following information is output by log:
DB Error: 1 "unrecognized token:" 47464636265757265763393573649 ""
DB Query: insert into 47464636265757265763393573649 (role, number, name) values (?,?,?)
In fact, I want to use 47464636265757265763393573649 to indicate that it is actually not feasible. Cannot be a pure number
Ii. log below. I want to use the date as the table name.
DB Error: 1 "near" 2014 ": syntax error"
DB Query: insert into 2014-11-01-(role, number, name) values (?,?,?)
It means "-" is not acceptable.
III. The following log, I want to use uri as the table name:
DB Error: 1 "near": chat0015453d2792ef ": syntax error"
DB Query: insert into sip: chat0015453d2792ef@chat.xxx.com (role, number, name) values (?,?,?)
Note @ is also not acceptable
It is possible that the underlying layer of sqlite3 program the table name as a class name. Because the naming rules of tables are the same as those of variables.
How to access a table in the created sqlite3 Database
Assume that the data inventory is stored in the C root directory named db1.db, run cmd, and then
Input c:
Enter cd \
Input sqlite3 db1.db
Advice: I used sqlite3 to create a database and added some data to generate a db file.
You can create a database as a 64-bit operating system. When you open the database using SQLite expert personal 3, the database is opened based on a 32-bit operating system. Therefore, the system reports incompatibility!