Oracle LEAST Function


/ Published in: SQL
Save to your folder(s)

A few examples of the Oracle LEAST function


Copy this code and paste it in your HTML
  1. SELECT LEAST(5, 18, 21, 3, 65) AS LEAST_CHECK FROM dual;
  2.  
  3. SELECT LEAST('France', 'England', 'Russia', 'Japan') AS LEAST_CHECK FROM dual;
  4.  
  5. SELECT LEAST('9', '12', '73', '15') AS LEAST_CHECK FROM dual;
  6.  
  7. SELECT LEAST('45', 'apple', 'banana', 100) AS LEAST_CHECK FROM dual;
  8.  
  9. SELECT LEAST(
  10. TO_DATE('25-MAR-2015'),
  11. TO_DATE('14-APR-2015'),
  12. TO_DATE('7-JAN-2015')) AS LEAST_CHECK
  13. FROM dual;
  14.  
  15. SELECT LEAST('France', 'England', NULL, 'Japan') AS LEAST_CHECK FROM dual;
  16.  
  17. SELECT LEAST('x', 'w', 'y', 'a', 'q', 'u', 'i', 'a', 'd', 's', 'g', 'k', 'e', 'w', 'i', 'p', 'a', 'z', 'b', 'c', 'm', 'w', 'r', 'y', 'n') AS LEAST_CHECK
  18. FROM dual;

URL: http://www.databasestar.com/oracle-least/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.