问一句SQL怎么写,在线等。 不知道distinct 針對某一個字段可不可以.. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 唯一ID 字段A 1 1000 2 1000 3 1001 4 1002select ID from 表 awhere not exists (select 1 from 表 where 字段A=a.字段A and ID<a.ID)orselect ID from 表 awhere not exists (select 1 from 表 where 字段A=a.字段A and ID>a.ID) 请教一个select from语句的写法 请教SQL分段查询平均值 sql 2000:一张表中百万数据分配到其他五张表中。 关于and / or 的复杂sql语句,向各位大虾请教 sql server 2008 企业管理器找不到MSSQLSERVER实例 ***在SQL Sever存储过程中如何求最大变量*** 筛选查询 数据仓库,数据收集问题。DTS (数据库管理员请进) 能不能指定数据对象返回记录集的范围 求教:开发工具的选择 求助:如何有条件取某一字段的唯一记录 关于无限级分类的查找,邹老大也进来看看
1 1000
2 1000
3 1001
4 1002
select ID from 表 a
where not exists (select 1 from 表 where 字段A=a.字段A and ID<a.ID)or
select ID from 表 a
where not exists (select 1 from 表 where 字段A=a.字段A and ID>a.ID)