select top 2 *
from b1
where a1=1
order by a3 desc
from b1
where a1=1
order by a3 desc
解决方案 »
- 使用insert语句时,什么样的数据要加引号,什么样的数据不用加引号?
- 请教一下UPDATE的问题
- SQL 2005卸载问题
- sqlserver2005上,想得到在这台db上被执行过的每一句sql文及每句sql文的执行时间
- 数据库排序规则 导致的显示乱码解决办法
- 求sql 语句
- 高分在线求助~~~
- 难题,无法解决,高手进来看一下~~~~~~
- SQL Server 2000能管理到多少张表?
- 有关sqlserver自动将页锁转换成表锁,使修改表记录出现死锁的问题
- 同一用户在不同网站登录,数据库设计问题
- ASP访问SQL2005,并发连接数超过200,DELL 4CPU + 16G内存 ,结果CPU占用率依旧是100%,请高手给予解决办法,在线等
insert @t
select 1, 1 , 1, 4 union all
select 2, 1 , 2, 5 union all
select 3, 1 , 2, 9 union all
select 4, 1 , 1, 8 union all
select 5, 2 , 4, 1select * from @t a
where not exists (select * from @t where a1=a.a1 and a2=a.a2 and a3>a.a3) and a1=1