再发菜鸟问题!急 可以这样啊,你的进货时间是日期型吗?select * from tablenameorder by to_char(进货时间,'yyyydd');进货时间替换成字段名啊。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对了后面加上DESC然后取第一条数据啊 select * from (select * from tablename order by 进货时间 desc)a where rownum = 1 select a.* from tablename a , (select pname,max(pdate) pdate from tablename group by pname)bwhere a.pname = b.pname and a.pdate = b.pdate select * from (select pname,pdate,row_number() over( partition by pname order by pdate desc)t from tablename)rwhere r.t =1 那难道你的MSSQL语句是你说的意思吗? select pname,max(pdate) pdate from tablename group by pname PLSQL的导入导出工具问题 OAF字段长度设置 请教一个PL/SQL的问题? 在线等,解决立即结贴! oracle创建用户,但在方案中没有对应的显示 如何获取Oracle 10g数据库中的非系统用户名? 无法启动isqlplus 一个简单的oracle问题 在oracle中,什么叫“会话连接” 请教数据导入的问题。。。 tns 紧急求救:服务里面没有oracletns 一项,从那里运行?? 关于VIEW的限制条件的问题,非常奇怪的问题 请教SQL语句的问题
后面加上DESC然后取第一条数据啊
(select pname,max(pdate) pdate from tablename group by pname)b
where a.pname = b.pname and a.pdate = b.pdate
select pname,pdate,row_number() over( partition by pname order by pdate desc)t from tablename)r
where r.t =1