I don't know query for this custom selection from mysql.

My question is similar to the thing as in PHP, we have a function isset($variable) and !empty($variable), is there anything similar in mysql? because I want to fetch a set of records, where book_id is set or not left empty.