I would discourage using raw SQL for moving a post to a trash or back, especially since there’s a build in function for it:
wp_trash_post( $post_id );
More about the wp_trash_post() function.
The opposite is:
wp_untrash_post( $post_id );
wp_untrash_post()
also untrashes trashed comments.
In WP there are functions for many things – for instance you can trash/untrash only comments, leaving the post alone – in that case use: wp_untrash_post_comments()
and wp_trash_post_comments()
.