- 1、本文档共18页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
SQLite数据库增删改查操作(国外英文资料)
SQLite数据库增删改查操作(国外英文资料)
One, use the embedded relational SQLite database to store data
On the android platform that integrates a embedded relational database SQLite, SQLite3 support NULL, INTEGER, REAL (floating point Numbers), TEXT (string TEXT) and BLOB (binary objects) data type, although only five types of it supports, but in fact SQLite3 also accept a varchar (n), the char (n), a decimal (p, s) data types, such as only preserved in operation or will be converted to the corresponding five types of data. The biggest feature of SQLite is that you can save all kinds of data in any field without worrying about what the data types of field declarations are. For example, you can store a string in a field of type Integer, or store a float in a Boolean field, or store a date value in a character field. But there is one exception: is defined as an INTEGER PRIMARY KEY fields can store 64 - bit INTEGER, when saved to the field data, other than the INTEGER will produce a mistake. In addition, when writing the CREATE TABLE statement, you can omit behind the field name of the data type information, such as the following statements you can omit the name field type information:
CREATE TABLE person (personid integer primary key autoincrement, name varchar (20))
SQLite can parse most standard SQL statements, such as:
The select * from table name group by group by group. Order by sort clause
Such as:
Select * from the person
Select * from person order by id desc
Select name from person group by name having count (*) 1
Pagination SQL is similar to mysql, and the following SQL statement takes five records, skipping the previous three
Select * from Account limit 5 offset 3 or select * from Account limit 3, 5
Insert statements: insert into the table name (field list) values (list of values). Insert into person (name, age) values ( think , 3)
Update statement: the update table name set field name = value where clause. Update person set name = call where id = 10
Delete statement: delet
文档评论(0)