I tried but failed:
mysql> select max(1,0);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0)' at line 1
maxMySQL
I tried but failed:
mysql> select max(1,0);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0)' at line 1
Best Answer
Use GREATEST()
E.g.:
Note: Whenever if any single value contains null at that time this function always returns null (Thanks to user @sanghavi7)