How to get the minimum value from the columns
I have a table Item and I want to get the minimum price of the Item for
the particular id
Table Item:
Id Price1 Price2 Price3
1 10 20 30
2 20 30 40
According to the above example, the minimum price for id-1 is 10 and for
id-2 is 20. I simply just want to get the minimum value from the three
column for particular id.
Remember: I can't create the cases as, any column can be null. Thanks in
advance.
No comments:
Post a Comment