> I need to insert recond to mysql use servlets, > > insert into mytable values('key', 'f1'); > > i need to chech if key is already in mytable. > > what is a good efficient way to do that?
Insert the value and see if a "DUPLICATE KEY" error is returned. Act accordingly. ---John Holmes... --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php