SQL query other than "case when...then"
Posted: 2021-09-09 13:38
Table A
Value
3
How to do a sql query to assign 'medium' based on the value in the Table A? The category will be referenced from Table B.
I can think of case when...then (hard-code) in the sql query. Is there any alternative way to write the query?
Table B
Category Min Max
Low 0 2.99
Medium 3 4.99
High 5 5.99
Value
3
How to do a sql query to assign 'medium' based on the value in the Table A? The category will be referenced from Table B.
I can think of case when...then (hard-code) in the sql query. Is there any alternative way to write the query?
Table B
Category Min Max
Low 0 2.99
Medium 3 4.99
High 5 5.99