
delete from fm_templates where id in (select id from tmp_templates);

insert into fm_templates(id,
       content,
       description,
       comment,
       version) select id,
       content,
       description,
       comment,
       version from tmp_templates;

drop  table tmp_templates;

