select a fictional column

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
rupam_jaiswal
Forum Newbie
Posts: 22
Joined: Thu Jun 05, 2008 12:54 am

select a fictional column

Post by rupam_jaiswal »

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
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Re: select a fictional column

Post by tr0gd0rr »

Code: Select all

SELECT f1, f2, 'luck' AS f5
Post Reply