Hope this below SQL query will solve your problem-
INSERT INTO wp_postmeta
(post_id,
meta_key,
meta_value)
(SELECT post_id,
'tnid',
meta_value
FROM wp_postmeta
WHERE meta_key = 'name'
AND post_id IN (SELECT id
FROM wp_posts
WHERE post_type LIKE 'post'))
Please try it first. I haven’t got the chance to try it.