Dan Parisien wrote:
> Why would I want to join my tables? how would I do it?
> will it save me from doing selects where i see if
> (table1.sID=table2.sID) ??
Adding to Tim's reply. In a normalized database you'd need joins. In a
contact list a person can have more than one phone number, so:
num INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT;
lname CHAR(20) NOT NULL;
fname CHAR(20) NOT NULL;
KEY n (lname, fname);
num INT UNSIGNED NOT NULL;
Then to get all of John Smith's phone numbers you'd:
SELECT fname, lname, phone FROM A, B
WHERE lname ='Smith' AND fname='John' AND A.num = B.num;