WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2006, 02:14 AM
mtomsana mtomsana is offline
WebProWorld New Member
 

Join Date: Nov 2006
Location: Cape Town
Posts: 1
mtomsana RepRank 0
Default Add/Update query

Hi everyone, i'm trying to create a query to transfer records from table to table and update records according to the changes made on the other table. The query must not duplicate records.
Reply With Quote
  #2 (permalink)  
Old 12-22-2006, 08:38 AM
linkstraffic linkstraffic is offline
WebProWorld Member
 

Join Date: Mar 2006
Posts: 56
linkstraffic RepRank 0
Default

you can try:

Code:
INSERT INTO ... SELECT ... ON DUPLICATE KEY UPDATE
http://dev.mysql.com/doc/refman/5.0/...rt-select.html
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: addupdate, query



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Search Engine Friendly URLs by vBSEO 3.0.0