Here is the code:

DELETE FROM `wp_posts` WHERE `post_type` = ‘myposttype’