Four simple SQL statements (add, delete, modify, and query statements) and SQL statements
Four simple SQL statements (add, delete, modify, and query statements) I. insert statements
Insert into [table] ([column], [column], [column]) values (?,?,?)
Ii. Delete statements
Delete from [table] where column =?
3. Modify statements
Update [table] set column =? Where column =?
4. query statement 1) query all fields of a single record
Select * from [table] where [column] =?
2) query all fields of all records
Select * from [table]
Order by [column] asc
Note:
1. order by column asc: column fields are arranged in ascending order. Desc is in descending order. 3) query all fields of a record with a given offset.
Select * from [table] limit [offset], [limit]
Note:
1. offset specifies the index from which the query starts. The default value is 0. 2. limit specifies the number of records to be queried. 4) query the specified field of the specified record.
Select [column], [column] form [table] where [column] =?