rupam_jaiswal Posted June 11, 2010 Share Posted June 11, 2010 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 Link to comment https://forums.phpfreaks.com/topic/204470-select-a-fictional-column/ Share on other sites More sharing options...
a.stilliard Posted June 11, 2010 Share Posted June 11, 2010 You can select something as something else, so you could select the word 'luck' as f5 SELECT f1, f2, 'luck' AS f5 FROM tablename Link to comment https://forums.phpfreaks.com/topic/204470-select-a-fictional-column/#findComment-1070758 Share on other sites More sharing options...
James25 Posted June 14, 2010 Share Posted June 14, 2010 hmm, it didn't work in my case Link to comment https://forums.phpfreaks.com/topic/204470-select-a-fictional-column/#findComment-1071745 Share on other sites More sharing options...
fenway Posted June 15, 2010 Share Posted June 15, 2010 hmm, it didn't work in my case Show us the query. Link to comment https://forums.phpfreaks.com/topic/204470-select-a-fictional-column/#findComment-1072359 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.