Here is what I have that currently works in a `SELECT` statement:

```
SELECT
    movieitemdetails.barcode,
    IFNULL(movieitemdetails_custom.title, movieitemdetails.title) AS title
FROM
...

```

The problem is that I need to have my SQL be more dynamic when it comes to column names and the amount of columns I have. I need to use `*` to dynamically pull back all rows. Here is some example pseudocode to show you what I need:

```
IFNULL(movieitemdetails_custom.*, movieitemdetails.*) AS *

```

I need it to bring back all of the columns with the same name on each table and do the `IFNULL` comparison. Obviously the code above is not correct.

Does anyone have any ideas on how to make what I have more dynamic involving `*`?

**Note to certain people:** Please don't give me flak about how I shouldn't use `*`. I know in general use it's not recommended, but in this specific project it is what we're going with.