
September 25th, 2012, 11:02 AM
|
|
Registered User
|
|
Join Date: Sep 2012
Posts: 2
Time spent in forums: 53 m 43 sec
Reputation Power: 0
|
|
|
Help for coloring the column
Hello,
I am new to databases and want help in below code:
Select
(CASE WHEN power<30 THEN (power,"Red") ELSE POWER
END )
from power_production;
What I want is if the column 'power' has value less than 30 then I want to display those values in Red color, else I want to print it as it is.
Output should look like this:
Power
100.00
34.89
22.14
55.34
12.3
Is it something possible in MySQL?If yes, what is the correct syntax for it as I know the code printed in blue color is not correct and giving me an error?
|