On Tue, 13 Nov 2001, Gerald Clark wrote: > Looks correct to me. > What do you think is the problem? > > 2 rows were affected by the replace. > One row was deleted, and one was inserted, > Both rows had a value of 'test' for column 'Tab'.
Cool, thanks to Jeremy Zawodny and you, now I know even more that I do not know sql. Well, I told you that. ;) I thought that REPLACE replaces only fields which are different, so if a line is missing, behaves as an insert, if the line is present, behaves as an updates on columns which differ. This means that I was hoping that UPDATE updates/rewrites all specified columns on line; REPLACE has some logic to figure out that we do not have to rewrite a column with the same data and so we do not have to recreate an index for such column. If I guess right, deleting a row means marking it as deleted, right, so the REPLACE in my case marked the old line/row deleted and appended a new row to the table? That would mean it's better to use UPDATE then REPLACE, right? ;) -- Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs MIPS / Institute for Bioinformatics <http://mips.gsf.de> GSF - National Research Center for Environment and Health Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany tel.: +49-89-3187 3616 , fax: +49-89-3187 3585 --------------------------------------------------------------------- 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