Wednesday, May 30, 2012

mysql simple update query 2 tables

UPDATE destination_table
SET my_column =

(  SELECT STR_TO_DATE( temp_column, '%d-%M-%y' )
  FROM `temp_table`
  WHERE `temp_table`.temp_id=destination_table.my_id  )
WHERE my_id >= 1928


destination_table (my_id, my_column)

temp_table(temp_id, temp_column )

No comments:

Post a Comment

About

Blogger templates