再发菜鸟问题!急 可以这样啊,你的进货时间是日期型吗?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 根据条件查询数据,若参数为空的时候应该怎么写? 100分在线等:SQL Developer转移SQL Server Express问题求助 to_date问题 转换成数值 将sqlserver语法转化成oracle语法,急!! 关于FUNCTION中的变量(急、急、急)在线等待 删除表示系统提示内存不足怎么解决 求个函数 PLSQL dev 连接远程数据库时报错 ORA-03113 有没有比较难的SQL 关于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