5 Tables one select ?

Discussion in 'MySQL' started by webboy, Feb 23, 2009.

  1. #1
    Hi all
    I have 5 blogs in one database and wish to select the option table from the DB all at one once and get the same row from each table.


    Is there a way I could use a wild card to select each table without calling each table in the select as i will be having more

    eg this is the database

    blog1option
    blog2option
    blog3option
    blog4option
    blog5option

    Select ID FROM %option% Where ID= '33'
     
    webboy, Feb 23, 2009 IP
  2. biglevel

    biglevel Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't believe there's a wildcard that does it, but you could consalidate the information I believe with some subqueries. The concept is to create "temporary tables" and select from them. I know there are "merge" options as well.
     
    biglevel, Feb 23, 2009 IP
  3. gnp

    gnp Peon

    Messages:
    137
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    gnp, Feb 23, 2009 IP