From: Steven Buehler Date: August 20 2010 9:30pm Subject: query help List-Archive: http://lists.mysql.com/mysql/222627 Message-Id: <001a01cb40ae$d9f79640$8de6c2c0$@ibushost.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001B_01CB4084.F1218E40" ------=_NextPart_000_001B_01CB4084.F1218E40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I am hoping that I can do this with one query, I have a table, "Domains" with 3 columns accountID, domainID, mailname what I am trying to do is find all accountID's for "domainID" of 12345 and see if a second row with "domainID" of 54321 exists for that "accountID,mailname". If it doesn't exist, I want it to insert another row with the same accountID and mailname, but with the second (54321) domainid. Any help would be appreciated. Thanks Steve ------=_NextPart_000_001B_01CB4084.F1218E40--