"SQLite" syntax
One. Create a database
1. Just create a database, just create a file, and when you do, point the connection string to the file
2. Connection string: Data Source = FilePath; Can't encrypt, so no password.
Two. Create a table
1. Syntax: CREATE TABLE TableName (str text,pic blob,int INTEGER)
2. Field type: You can ignore the type, you set all types to TEXT is not a problem, but for easy to use and reading, it is recommended to set the corresponding type (picture, binary BLOB), or read the data when the conversion may be problematic
Three. Common syntax (basically consistent with SQL SERVER and improved with some common statements)
1. SELECT as
2. DELETE as
3. Insert Update:sqlite with REPLACE, if there is a unique constraint in the field, storage, the unique field is the same UPDATE, different insert, this is very convenient
4. Group: SQLite has the limit OFFSET keyword, limit gets the number, OFFSET start index, this is much more useful than SQL SERVER
5. System functions are basically consistent with SQL SERVER, such as Max,disdinct,order By,inner JOIN
Four. Summarize
1. As an open source free database, SQLite is very powerful
2. Use, some small applications, local data inventory offline data, but can not be encrypted, so private data can not be saved
"SQLite" syntax