You could make the column a unique key...that would prevent duplicates from being entered. Then if you want to be able to try inserting duplicates (like if you don't want the query to fail on duplicate attempts), you could do INSERT IGNORE INTO myTable ...
Check http://www.mysql.com/doc/en/CREATE_TABLE.html and http://www.mysql.com/doc/en/ALTER_TABLE.html for information about keys. -Brian McCain ----- Original Message ----- From: "Wileynet" <[EMAIL PROTECTED]> To: "'mysql users'" <[EMAIL PROTECTED]> Sent: Wednesday, March 26, 2003 3:03 PM Subject: Beginner question - Preventing Duplicate Entries Is there a sql statement that would not allow the same entry twice. Something like INSERT into myTable s WHERE s != Value(?). I don't know if that makes sense but I thought I would give it a shot. Basically I want to know if it is possible and if so can you point me to a webpage or give me an example if you can? Thanks in advance - Wiley -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]