How do I find a minimum score from 4 different column of table?
So, if I have column 1 with minimum value is 4, column 2 with minimum value is 3, column 3 with minimum value is 2 and column 4 with minimum value is 1. I want the query is making the result exactly is 1 (from column 1, 2, 3 and 4)
By the way i am using MYSQL, thanks 😀
Use LEAST function in following way:
From above mentioned documentation,
If the return value is used in an INTEGER context or all arguments
are integer-valued, they are compared as integers.
If the return value is used in a REAL context or all arguments are
real-valued, they are compared as reals.
If the arguments comprise a mix of numbers and strings, they are
compared as numbers.
If any argument is a nonbinary (character) string, the arguments are
compared as nonbinary strings.
In all other cases, the arguments are compared as binary strings.