I like to use SELECT in a table, which may contain some field, but maybe not. If not, the value can be returned as NULL, for example JOIN LEFT, for non-existing strings.
Eg. something like this pseudo-sql:
SELECT id, email IF EXISTS, name, address FROM users;
should start without errors on the "users" of the table without the "email" field, but instead return email = NULL.
source
share