...

View Full Version : handle nonexisting columns



BubikolRamios
03-08-2009, 08:42 AM
select
IFNULL(t.AB,t.EN) as L
FROM
table t

EN column exists.
This is ok if t.AB exists, need it to work even if it does not exists, like:

Pseudocode:


select
IFNULL_ERROR(t.AB,t.EN) as L
FROM
table t


Is there something like that ?

guelphdad
03-08-2009, 04:34 PM
no, if you try to select from a column that doesn't exist in the table you will get an error.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum