#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    7
    Rep Power
    0

    MySQL basic Help


    I have 2 tables with company names (around 1,000 companies) and products (20,000 products).

    I am looking to create a table which would have all products against each companies. eg. "company#1" in column A each in rows 1 to 20k... and "products#1 to 20,000" in column B
    similarly for company#2" and so on

    - so I would have 1,000*20,000 = 20,000,000 records in table.

    Thanks
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    So you want ALL companies to be linked to ALL products?

    Code:
    SELECT * FROM companies, products;
    Is there more to this question?

    We also have a MySQL forum for more complex issues.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo