sql - MySQL: Possible to have wildcards in AS aliases? -


I have a bunch of similar fields in several tables (I inherited it - do not blame me;)

Rather than implementing all aliases, is it possible to automatically alter / interpolate through a wildcard?

I'm imagining something (which does not really work in real life):

  SELECT t1 *, T2 * As alias2 *, T3. * Alias3 *  

So I'll get back the fields like:

  name, address, city, state surname 2.name, surname 2. address, alias2.city, Alias2.state alias3.name, alias3.address, alias3.city, Alias3.state  

This, if you use it:

  SELECT t1. *, Alias2. *, Alias3 * T1, T2 AS alias2, t3 as alias3  

Define the table nickname, then you can use the table alias. SELECT in *.

Disclaimer

I have only used ANSI-ANSI, but it is still correct to correct the address 89 syntax for short - honest .


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -