select * from 表 a where not exists( select * from 表 where id=a.id and score>a.score)
to lsxaa(小李铅笔刀) 我用的Informix,这个语法 select x.*,z.* from x,(select abc from z) z 就不支持啊。
用 zjcxc(邹建) 的方法现在已经可以了。但是不明白的是 select * from 表 a where not exists( select * from 表 where id=a.id and score>a.score)中是否是整条记录比较,因为不像 “字段 not in ()”这种用法,select * from 表 没有指定具体字段。没想到这样用也行。
where not exists(
select * from 表
where id=a.id and score>a.score)
我用的Informix,这个语法
select x.*,z.* from x,(select abc from z) z
就不支持啊。
select * from 表 a
where not exists(
select * from 表
where id=a.id and score>a.score)中是否是整条记录比较,因为不像 “字段 not in ()”这种用法,select * from 表
没有指定具体字段。没想到这样用也行。