Android Database Expert secret (7)-experience the query art of LitePal
After studying many articles, we have mastered most of the content in LitePal. In retrospect, we have all learned the first three operations in addition, deletion, modification,
Check the data table of the App without the root user.
For a long time, you have to use root to view sqlite databases. However, it is troublesome to use root on many testing machines in the company ~~~
Recently, the project went live, just a little
Sqlite:1. A Lightweight data management tool for local data storage is one of the many tools used to implement database management.2.Android has absorbed the code functions of SQLite in its system, we can directly in the Android program using SQLite'
In practical applications, there may be some repeated records that need to delete some fields. I will write down what I can think of now, and hope the experts can add it. 1,
The specific implementation is as follows:
Table CREATE TABLE
-------------
In the previous section, listview + simpleadapter is used to display list data, but it only accepts list Type data. In most cases, our data comes from the SQLite database. Generally, SQLite returns a cursor type data, which must be completely used
SQLite is a lightweight database designed for embedded devices. It has only five data types:
Null: NULL
Integer: integer
Real: Floating Point Number
Text: String
BLOB: Big Data
In SQLite, the Boolean and date types are not specifically designed,
Sharedpreferences is only suitable for storing relatively simple data and key-value pairs, supporting different data typesFile storage key value pairs are not, no format processing, storing simple binary or text dataSQLite can handle data that is
Tag: Offset while creat returns from the This Super project GREBroadly divided into the following areas:
Some query order collation
Use SQL statements for special queries
Detecting the existence of a table field
Database Upgrade
SqliteSQLite is an ultra-lightweight embedded database with a size of only hundreds of KB, but its syntax supports standard SQL syntax and also adheres to the acid transactions of the database, so developers who have learned other databases can
Use the explain statement to check optimizer action +----+-------------+----------+-------+---------------+------+---------+------+------+------- ---------- | ID | Select_type | Table | Type | Possible_keys | Key | key_len| Ref | Rows | Extra +----+-
I. Grammar
Explain
For example: Explain select * from T3 where id=3952602;
Two. Explain output interpretation
The code is as follows
Copy Code
+----+-------------+-------+-------+-------------------+---------+--------
This example describes Android's approach to acquiring mobile phone numbers based on APN. Share to everyone for your reference. Specifically as follows:
Before many people said that can not fully obtain mobile phone number, because there are now
Original: http://www.cnblogs.com/growing/archive/2010/11/19/1881372.html
Mobile phone numbers are not all available. Just a part of it can be got. This is because the mobile operator did not write the phone number data to the SIM card. SIM card
About SQLite
SQLite is an extension of the embedded SQL Database engine SQLite (SQLite embeddable SQL DB Engine). SQLite is an implementation of the embedded SQL database engine small C language library (c library), implemented a stand-alone,
The first method of use//////////////////////////////////////////////////////////////////////////Char szcommandline[] = "Notepad";Startupinfo si = {sizeof (SI)};Process_information Pi;Si.dwflags = startf_useshowwindow;//specified Wshowwindow member
Joint queries are more efficient, with examples to illustrate Federated queries: The benefits and usage of inline inner join, leftist left outer join, right-outer JOIN, full-union, fully outer join.The efficiency of joint queries is high, and the
Most database engines (as far as we know of each SQL database engine except SQLite) use static, rigid types, and the type of data is determined by its container, which is the specific column that is stored.SQLite uses a more general dynamic type
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.