Oracle
 sql >> Datenbank >  >> RDS >> Oracle

Rufen Sie die neueste Zeile ab – vor Oracle 12c

Für eine Oracle DB vor 12c sollte dies funktionieren

SELECT * FROM
  (
  SELECT ORDER_TYPE,
         ORDER_NUMBER,
         ORDER_LINE,
         NOTE_PAD.CREATED_DATE
  FROM ORDER_AWB INNER JOIN
         NOTE_PAD ON ( "ORDER_AWB"."NOTES" = "NOTE_PAD"."NOTES" )
  WHERE ( "ORDER_AWB"."ORDER_NUMBER" = '867318' )
  ORDER BY NOTE_PAD.CREATED_DATE DESC
  )
WHERE ROWNUM <= 1