delete
FROM App_Ponderation e2
WHERE (ID <
(SELECT MAX(e1.id)
FROM app_ponderation e1
WHERE e1.idcode = e2.idcode))请教大家帮我看看上面的SQL语句那里出错,本人是想把有不同ID号而有相同的IDCODE的数据笧徐
FROM App_Ponderation e2
WHERE (ID <
(SELECT MAX(e1.id)
FROM app_ponderation e1
WHERE e1.idcode = e2.idcode))请教大家帮我看看上面的SQL语句那里出错,本人是想把有不同ID号而有相同的IDCODE的数据笧徐
解决方案 »
- 新手请教
- SQL SERVER2005 xp_cmdshell
- 对SQL数据表中一字段中的部分数值进行修改应该怎么做?
- 大数据量的读写问题
- 如何读出sqlserver日志文件内容,很急啊,我在线等着
- 急:从SQL2000数据库读写图片问题
- 安装问题。提示‘安装程序正在启动服务器并安装您选择的配置’,然后一直就不动了……试了很多次都是最后一步,怎么办?
- 请问,我电脑里有个Microsoft Visul Studio 2008 是干什么用的?是和sql server 捆绑安装到机器里的吗?
- 怎么样快速向SQL数据库插入大数据量的数据?
- SQLServer2005安装软件有免费的吗?
- 存储过程中的参数问题?
- 简单总是散点分!~!~1
(
id int,
idcode varchar(2)
)
insert into App_Ponderation
select 1,'a' union all
select 2,'b' union all
select 3,'c' union all
select 4,'a' union all
select 5,'c'
select * from App_Ponderationdelete from App_Ponderation
where id not in(select max(id) from App_Ponderation group by idcode)
select * from App_Ponderation
FROM App_Ponderation e2
WHERE (ID <
(SELECT MAX(e1.id)
FROM app_ponderation e1
WHERE e1.idcode = e2.idcode))