Log in

View Full Version : select a fictional column



php_techy
06-11-2010, 09:49 AM
Hi,
In mysql, I have a table A with fields f1,f1,f3,f4.
I want to select some selected column values like f1,f2 and a new fictional column f5 whose value will always be 'luck'.
say it should return

f1 f2 f5
------------------
a1 a2 luck
b1 b2 luck
c1 c2 luck

Is there any way out??
Thanks in advance!!!!!!
Regards

james438
06-11-2010, 11:52 AM
SELECT f1, f2, 'luck' AS f5 from tablename