SQL query to check whether a meta key is set or not for a post in post_meta table

Pure SQL questions are off-topic but beyond that, pure SQL is dangerous because it may break if the WordPress Core changes the database structure.

You are better off using Core tools where possible. In this case, WP_Query can do what you need.

$args = array(
  'post_type' => 'post',
  'meta_query' => array(
    array(
      'key' => 'status',
      'value' => null,
      'compare' => 'NOT EXISTS'
    )
  )
);
$query = new WP_Query( $args );

That will generate this SQL:

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id
                          AND wp_postmeta.meta_key = 'status')
WHERE 1=1
  AND wp_posts.post_type="post"
  AND (wp_posts.post_status="publish")
  AND (wp_postmeta.post_id IS NULL)
GROUP BY wp_posts.ID
ORDER BY wp_posts.post_date DESC LIMIT 0,3

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)