I'm writing a small script to hold client billing information + hosting information (domain name, package, cost, add'tl domains). I would rather put them in different tables (client_info & hosting_info). I was curious what I would do to link them? Would there be a column that is identical to both of them that iwll identify that row 3 belongs to row 3 ?
Yes, they need to have some sort of linking value. Int the example below both have orderid in common:
To get information from both tables, use:
SELECT * FROM Orders o
INNER JOIN OrderDetails od ON o.OrderID = od.OrderID
AND (additional criteria you need to meet, if any)
Although you should replace the * with the fields you need. You can also replace "inner" with "left outer" if you don't always have a matchinf record in "OrderDetails", but still want it to return info from "Orders".