select * from 表a a
where c='xx' and (select count(*) from 表a where c='xx' and b<=a.b) in(2,4)
order by b
where c='xx' and (select count(*) from 表a where c='xx' and b<=a.b) in(2,4)
order by b
解决方案 »
- SQL的基本查询问题~
- 还是数据库问题
- 在线求sql语句 急
- 请教---查出一个表中任何字段包含了指定的字符的记录.
- 已知算法,求一身份证号转换SQL语句
- 主服务器表内添加了字段,在不停主服务器情况下怎样更新备份服务器的表结构?
- 从一个表插到另一个表,问题。。。急!!!高手帮忙。
- 因在SQL SERVER中使用了触发器,且又频繁的插入数据,导致SQL SERVER的资源占用率经常达到100%,有什么好的办法能避免这种情况吗???
- 日志中的内容如何查看和删除?因为它越来越大,而我跟本用不着它……
- 在Navicat中操作Mysql数据卡,创建存储过程然后运行的时候直接运行else语句,什么原因,代码如下!
- 求助:单位的数据库为SQL6。5英文版,因更换服务器,升级到SQL SERVER 2K中文版,原数据库为*.DAT,请问如何将原来的数据库导入SQL2K?
- 如何实现两个表的统计。
where c='xx' and (select count(*) from 表a where c='xx' and b<=a.b) in(2,4)
order by b
要不再这样试试
select * from 表a a
where c='xx' and (select count(*) from 表a where c='xx' and b<=a.b) in(2,4)
order by bselect * from 表a a
where c='xx' and (select count(*) from 表a where c=a.c and b<=a.b) in(2,4)
order by b