# MySQL insert record to one table to another if postid is not exist

Is there any way to write this query in a better way than this if I want to insert postid from posts table to star_ratings table if the postid is not exists in star_ratings table?

INSERT INTO star_ratings(post_id)
SELECT postid FROM posts
WHERE type in ('D', 'B')
AND postid NOT IN (SELECT post_id FROM star_ratings)
ORDER BY postid ASC