Here're a couple of tables: create table company(CompanyID varchar(32),...);
create table contact(CompanyId varchar(32),... INDEX (CompanyID), FOREIGN KEY (CompanyID) REFERENCES company(CompanyID); Now, my expectation is that if contact has a CompanyID but it does not match one already existing in company, an insert fails. But, I also have the expectation that if contact does not have a companyID, the insert should succeed. Is this right or wrong? Second, (oh no, it's that null question again!) what constitues not having a company ID? Does the field have to be set specifically to NULL or does an empty string work? Right now, my code is taking a value from a form and assigning it to a field object. A connection object then does an insert using the field object as a parameter. Therefore, if the form company ID field is blank, the value assigned to the field object is an empty string... not the null \N. In fact, I'm not sure I can even change this Thanks. Randy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]