sqlite 的 limit
来源:互联网 发布:浙江大数据交易中心 编辑:程序博客网 时间:2024/05/20 14:43
原贴:点击打开链接
drop table if exists student;create table student( id INT PRIMARY KEY,[name] NVARCHAR(20), classNo INT,gender char(1) );insert into student(id,[name],classNo,gender) values(1,'小明a',1,'男');insert into student(id,[name],classNo,gender) values(2,'小明b',1,'男');insert into student(id,[name],classNo,gender) values(3,'小明c',1,'男');insert into student(id,[name],classNo,gender) values(4,'小明d',1,'男');insert into student(id,[name],classNo,gender) values(5,'小明e',1,'男');insert into student(id,[name],classNo,gender) values(6,'小明f',1,'男');insert into student(id,[name],classNo,gender) values(7,'小明g',1,'男');insert into student(id,[name],classNo,gender) values(8,'小明h',1,'男');insert into student(id,[name],classNo,gender) values(9,'小明i',1,'男');insert into student(id,[name],classNo,gender) values(10,'小明j',1,'男');insert into student(id,[name],classNo,gender) values(11,'小明k',1,'男');insert into student(id,[name],classNo,gender) values(12,'小明k',2,'男');insert into student(id,[name],classNo,gender) values(13,'小红1',1,'女');insert into student(id,[name],classNo,gender) values(14,'小红2',1,'女');insert into student(id,[name],classNo,gender) values(15,'小红3',1,'女');insert into student(id,[name],classNo,gender) values(16,'小红4',1,'女');insert into student(id,[name],classNo,gender) values(17,'小红5',1,'女');insert into student(id,[name],classNo,gender) values(18,'小红6',1,'女');insert into student(id,[name],classNo,gender) values(19,'小红7',1,'女');insert into student(id,[name],classNo,gender) values(20,'小红8',1,'女');insert into student(id,[name],classNo,gender) values(21,'小红9',1,'女');insert into student(id,[name],classNo,gender) values(22,'小红10',1,'女');insert into student(id,[name],classNo,gender) values(23,'小红11',1,'女');insert into student(id,[name],classNo,gender) values(24,'小红12',2,'女');select * from (select * from student where classNo=1 and gender='男' order by id limit 0,10) as t1union allselect * from (select * from student where classNo=1 and gender='女' order by id limit 0,10) as t2 order by gender desc,id/*idnameclassNogender1小明a1 男2小明b1 男3小明c1 男4小明d1 男5小明e1 男6小明f1 男7小明g1 男8小明h1 男9小明i1 男10小明j1 男13小红11 女14小红21 女15小红31 女16小红41 女17小红51 女18小红61 女19小红71 女20小红81 女21小红91 女22小红101 女*/
阅读全文
0 0
- SQLite的limit用法
- SQLite的limit用法
- sqlite的limit使用
- sqlite的limit用法
- sqlite 的 limit
- Sqlite LIMIT / OFFSET的疑问
- sqlite中limit的使用
- sqlite中limit的使用
- SQLite limit
- sqlite limit用法
- Android SQLite-limit
- Sqlite limit用法
- Error之sqlite中查询时的limit出错
- 使SQLite的UPDATE/DELETE支持LIMIT子句
- SQLite与SQL差异 top和limit的使用给我带来的困惑
- SQLite学习笔记四:LIKE,GLOB, LIMIT
- 关于mysql的limit
- MYSQL limit的优化
- protoc3.5报文件不存在
- C 语言对于存储区域及指针的概念总结
- Laravel入门教程(七)- 表单Controller
- 统计某个字段中各个字符出现的次数
- 侧拉+TabLayout+轮播+XListView
- sqlite 的 limit
- linux 安装redis4.0.2
- Gradle插件开发 APK瘦身资源自定义7z压缩
- Face Model Compression by Distilling Knowledge from Neurons 论文理解
- 排序
- javax.net.ssl.SSLKeyException: RSA premaster secret error
- 注解的处理器映射器和适配器配置
- 数据结构上机——图(第一次)
- tomcat配置