c创建表: create table 表名称(元素名称 类型,,,);
插入数据:insert into 表名称 values(null,,,)
修改数据 : update 表名 set 字段=’修改字段内容’ where 条件
简单查询语句:1. select * from 表名称
2.select 字段名称 from 表名
3.select 字段名称 from 表名 where 字段条件
4.select * from 表名 order by _id
5.select * from 表名 order by _id desc
6.select * from 表名 order by _id desc limit 10
7.select * from 表名 order by _id desc limit 10,3
8.select date(‘now’)
9.select time(‘now’)
10.select datetime(‘now’)
11.select count(*) from lol where _id >9
插入数据:insert into 表名称 values(null,?,?,?)
sqlite 支持那些数据类型?
作业:
1.创建一个学生表 里面有 学生编号 学生姓名 学生年龄 学生身高 体重 是否玩过lol
2.连续插入20条数据
3.根据年龄排序
4.修改年龄小于18岁的 同学的是否玩过lol的属性为 NO
5.删除所有体重大于150的同学
6.查询玩过lol的身高高于170的同学的名字(只显示名字)
7.查询所有不会玩lol的同学的数量总和
8.查询所有年龄大于20岁的同学
9.根据身高排序
10.查询出自己的姓名
原文:http://www.cnblogs.com/gaoxiaojie/p/5071905.html