Monday, 10 December 2012

one column in onetable is insert into another table in mysql query



one column in onetable is insert into another table in mysql query
 
update Fileversions
set    Fileversions.filename = (select Filedata.filename
                  from Filedata 
                  where Fileversions.file_id=Filedata.file_id)
where exists (select 1
              from Filedata
              where Fileversions.file_id=Filedata.file_id) 
 

No comments:

Post a Comment