MySQL Forums
Forum List  »  Newbie

Is it Possible to concat result from show tables with a query?
Posted by: Francisco Pastrana
Date: July 30, 2014 03:24PM

Hi:

Well the problem is, A partner is developing a webpage that have a dropbox that shows month-Year availables to select from some tables...

I have 3 tables,t2012,t2013,t2014, (each per year because the number of rows) with a column called date_p. Actually we put a query in the drop box that selects all month-years available, but if in the future we add a new table, is there a way that a query retrieve the dates from all tables available without modify code?

I can't remember what i did before with a similar case, something like retrieving from information schema column names then concat the result with a query something like this:

select column1, concat('word',select x_column1 from table_X,column2) etc...

Can you help me please? Sorry for the very confusing description I hope you can understand.

Options: ReplyQuote


Subject
Written By
Posted
Is it Possible to concat result from show tables with a query?
July 30, 2014 03:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.