SQL MIN scalar function in DB2 for i SQL

SQL MIN scalar function in DB2 for i SQL
SQL MIN scalar function in DB2 for i SQL, sql function, ibmi db2, db2 sql
SQL MIN scalar function in DB2 for i SQL

MIN

The MIN function returns the minimum value in a set of values. We should pass at least 2 arguments.

Syntax

MIN(arg1, arg2, arg3, ...)

Example #1:

SELECT MIN(3,2,4,9,7,8) FROM SYSIBM.SYSDUMMY1
     MIN
            1

Example #2:

SELECT MIN(3,2,4,9,7,8,10.1, 11) FROM SYSIBM.SYSDUMMY1
        MIN
             2.0

Example #3:

SELECT MIN('a', 'b', 'c') FROM SYSIBM.SYSDUMMY1
MIN
   a    

Example #4:

SELECT MIN('a', 'b', 'A') FROM SYSIBM.SYSDUMMY1
MIN
   a    

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain