求一句sql,向高手求教 我现在有一个面试表,fr_code是面试记录key(主键),fr_ecode是人员记录key(另一个表的key,外键),fr_ymd是面试时间,查找表中每一个人最新的面试记录(用fr_ymd 作判断)的fr_code 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from 面试表 a where not exists(select 1 from 面试表 where fr_ecode=a.fr_ecode and fr_ymd>a.fr_ymd) --或者:select * from 面试表 a where fr_ymd in(select max(fr_ymd) from 面试表 where fr_ecode=a.fr_ecode)--等等 select fr_code from facerecord a where fr_ymd in(select max(fr_ymd) from facerecord where fr_ecode=a.fr_ecode) 请教一个分类统计的问题(急) 通过表中的记录照片文件名提取文件夹中相应照片?请前辈指导! 这样的like怎么实现?搞定结! 数据表字段统计问题 维护编号的存储过程如何写? 请问怎么将一个表的里面某个字段的数据按顺序添加到本表另一个字段去? 关于sql server分区索引的问题 问一个比较奇怪的(SQL Server 不存在或访问被拒绝)的问题.... 把几张临时表组合成一张临时表 找一条优化的SQL语句.... 创建成了数据库,马上建新表报错,重新运行,可以成功,怎么一次搞定 SQL 2005中的自带数据库是什么啊?怎么找到它或添加它?
select * from 面试表 a where not exists(select 1 from 面试表 where fr_ecode=a.fr_ecode and fr_ymd>a.fr_ymd)
--或者:
select * from 面试表 a where fr_ymd in(select max(fr_ymd) from 面试表 where fr_ecode=a.fr_ecode)--等等