Kbase 21994: SQL-92: Equivalent of 4GL FIND FIRST/LAST Statements
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  25/04/2002 |
|
SUMMARY:
This Solution provides a way to perform an equivalent of the 4GL FIND FIRST/LAST statements in SQL.
SOLUTION:
-- Equivalent of FIND FIRST customer:
select * from pub.customer
where custNum = (select min(custNum) from pub.customer);
-- Equivalent of FIND LAST customer:
select * from pub.customer
where custNum = (select max(custNum) from pub.customer);