In mobile development, we often encounter SQLite database and summarize the commonly used list.
If there is a data table in the database company, as follows:
ID NAME age ADDRESS SALARY---------- ---------- ---------- ---------- -------- --1 Paul California 20000.02 Allen Texas 15000.03 Teddy Norway 20000.04 Mark rich-mond 65000.05 David Texas 85000.06 Kim south-hall 45000.07 James Houston 10000.0
Requirement 1: find age greater than or equal to 25 and wages greater than or equal to 65000.00
sql: select * from company WHERE age >= 25 and SALARY >= 65000
query result
ID NAME age ADDRESS salary---------- ---------- ---------- ---------- ----------4mark 25 rich -mond 65000.05 david 27 texas 85000.0
Requirement 2: Find all the ' ki start ' content.
*' ki% '
ID NAME age ADDRESS SALARY
---------- ---------- ---------- ------ ---- ----------6 kim 22 south -hall 45000.0
requirements 3: Specify a range, such as find age 25, 27.
sql:selecte *from company WHERE Age in (25,27)
or age is not 25,27
sql:selecte *from company WHERE age isn't in (25,27)
Requirement 4: Find records between 25 and 27 for age
sql:selecte *from company betwen
Use of SQL statements