Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Returns the smallest value in a column, including any logical values and numbers represented as text.
The MINA function takes as argument a column that contains numbers, and determines the smallest value as follows:
If the column contains no numeric values, MINA returns 0 (zero).
Rows in the column that evaluates to logical values, such as TRUE and FALSE are treated as 1 if TRUE and 0 (zero) if FALSE.
Empty cells are ignored.
If you do not want to include logical values and text as part of the calculation, use the MIN function instead.
The following expression returns the minimum freight charge from the table, InternetSales.
The following expression returns the minimum value in the column, PostalCode. Because the data type of the column is text, the function does not find any numeric values, and the formula returns zero (0).