Suppose that we have, in mysql, a table "mytable"
with the columns: id, title, type.
Is it possible to use its column as a table name in the same query?
For example:
SELECT m.id, m.title FROM mytable m INNER开发者_JS百科 JOIN m.type WHERE m.id=2
Where "type" will give me the name of the table to do the inner join.
No, Sorry :(
The closest you can get (afaik) is to cursor through your main table and write dynamic html for the join for each row. VERY slow.
Or, find a new design pattern - Is there scope for you to post a question about what you are trying to achieve and how people may go about that?
Why not put all of your type data in a single table ? and then partition the table by type.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论