It performs various operations on strings based on the requirements of the program.
MySqlIF | It will return a value based on the condition used |
MySqlIFNULL | It returns the first argument if the value is not Null else it will return the second argument |
MySqlNULLIF | When the first argument is equal to the second, then it will return a null value, otherwise, it will give the second argument |
MySqlCASE | If when condition is satisfied result will come in Then part otherwise the result will come in ELSE part |
MySql CAST | Value of any type can be converted into the value of a specified type with the help of cast statement |
LAST_INSERT_ID | It will give the sequence of the Record which is inserted lastly, |
IF in MYSQL
Syntax:
SELECT COUNT (aggregate_expression) FROM table_name [WHERE conditions]; EXAMPLE: SELECT COUNT(*) FROM employee_tbl WHERE name="Zara";