PDA

View Full Version : INSERT and/or UPDATE depending on situation


geniuscrew
03-17-2004, 10:54 PM
Long time since I've posted here!

Anywayz, lol, I need some help on a query.

If there are no changes to a record, or it has similar data, how can I leave that, but insert any new data into the DB?

Thanks v much

Dean C
03-18-2004, 09:09 AM
Replace Into ?

geniuscrew
03-18-2004, 09:29 AM
i heard that deletes the whole record then inserts it again. However i have a field in there which will vary so deleting the whole record and then inserting will result in different data for that field i think lol

Dean C
03-18-2004, 02:15 PM
REPLACE INTO updates a record if it's key ID field is present else it inserts it :) Very useful at times :)

geniuscrew
03-18-2004, 03:47 PM
Ohhh my bad - it is very useful after all (=


Thanks!