mssql去除重复并排序的问题
SQL code:
/*
create database temp
use temp
create table employees
(
eID int identity primary key,
eName nvarchar(50) not null,
eSex smallint not null default(1),
eSort smallint default(0)
)
insert into employees values('a1',1,1);
insert into employees values('b5',0,5);
insert into employees values('a6',0,6);
insert into employees values('b3',1,3);
insert into employees values('a1',1,7);
insert into employees values('b5',0,9);
insert into employees values('a6',0,10);
insert into employees values('b3',1,20);
*/
想得到这么样的一个结果:(去除重复的eName,查询出esort最大的记录集)
5 a1 1 7
6 b5 0 9
7 a6 0 10
8 b3 1 20
{{
相关问答:
现有一个ASP+mssql的网站,被挂马了,将里面一个表中的ntext字段挂马挂马,“<script src=http://木马地址></script>”,的方式是,不断地修改该字段的值,直接加在最后的,时间长了,可以看到该字段中有 ......
主机
客户机c1,c2,c3,c4,c5............
要求如何保证客户机向主机提交数据尽量实时.快速.完整
直接用insert 时,锁住主机的表.所以此方法不可行
请高手支招..
如果只插入而不读,用低隔离级别
你插你的,他插 ......
有沒有辦法實現,從MSSQL2000企業管理器註冊MSSQL2008數據庫?
连不上吧
貌似沒希望。。。
应该是不行的 跨太多了
那2000的 ......
在vbscript中不用on error resume next如何判断mssql语法错误!
TRY CATCH?
或者使用流程控制语句
if
else
不用on error 用那个我就不需要在这里寻找答案
引用
不用on error 用那个我就不需 ......