Define the variable and set it in the server,
SET @country = 'Sri Lanka';
SET @section = 'Science Fiction';
Now you can write the query with placeholders,
SELECT book_name, isbn_number, author_id
FROM book_store
WHERE published_in = @country
AND category = @section;
...
No comments:
Post a Comment