首页 > 移动平台 > 详细

ios开发之数据库FMDB

时间:2015-04-03 13:22:27      阅读:135      评论:0      收藏:0      [点我收藏+]

 

 

选择以下按钮进行编辑

 技术分享

数据库的创建

create table if not exists StudentInfo(sid integer,username vachar(20),password vachar(20),scare vachar(20))

 

插入

insert into StudentInfo(sid,username,password,score)

values(1501,‘zhangsan‘,‘123‘,‘100’)

 

查询

select "from StudentInfo”;

查询指定字段

select username from StudentInfo;

查询指定条件的信息

select *from StudentInfo where username=‘zhangsan’

根据指定多个条件查询

select *from StudentInfo where username=‘zhangsan‘ and password=‘123‘

默认升序排序

select *from StudentInfo order by score

降序排序

select *from StudentInfo order by score desc

统计行数

select count(*)from StudentInfo

修改数据

update StudentInfo set score=‘100‘ where username=‘zhangsan’;

删除数据

delete from StudentInfo where sid=‘1502‘

 

ios开发之数据库FMDB

原文:http://www.cnblogs.com/xjia/p/4389609.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!