SQL Server query using IIF function to compare two integers and return 'TRUE' or 'FALSE'; result shows 'FALSE' for the given values.

This image illustrates a SQL Server query using the IIF function to evaluate a conditional expression. Two integer variables, @FirstArgument and @SecondArgument, are declared with values 10 and 20 respectively. The IIF function checks if the first is greater than the second and returns ‘TRUE’ or ‘FALSE’ accordingly. Since 10 is not greater than 20, the output is ‘FALSE’. This showcases a simple usage of conditional logic in SQL queries.

×

Table Of Content