Adding featured for post using database

First of all, never ever use Plain SQL query to WordPress, because it’s too dangerous. Try $wpdb class, if you need to.

BTW, adding posts, post description, assigning featured image, etc. there are wrapper functions designated for these particular tasks, like:

Always, try to consult Codex or Developer Guide for true direction.

error code: 523