Select the following button to edit
Creation of a database
Create Table if not exists Studentinfo (Sid Integer, username vachar, password Vachar), scare Vachar (20))
Insert
Insert into Studentinfo (Sid,username,password,score)
Values (1501, ' Zhangsan ', ' 123 ', ' 100 ')
Inquire
Select "From Studentinfo";
Querying a specified field
Select username from Studentinfo;
Querying information for a specified condition
Select *from studentinfo where username= ' Zhangsan '
Query by specifying multiple criteria
Select *from studentinfo where username= ' Zhangsan ' and password= ' 123 '
Default Ascending sort
Select *from studentinfo order by score
Sort Descending
Select *from studentinfo order by score desc
Number of rows of statistics
Select Count (*) from Studentinfo
modifying data
Update Studentinfo set score= ' where username= ' Zhangsan ';
Delete data
Delete from Studentinfo where sid= ' 1502 '
iOS Development Database Fmdb