SELECT title, author, price
FROM books
WHERE bookid = 4
To select multiple bookid
s, you can use the IN
clause in your SQL query. Here's how you can modify your code to select multiple bookid
s:
SELECT title, author, price
FROM books
WHERE bookid IN (4, 5, 7) -- Replace 4, 5, 7 with the IDs you want to select
This will allow you to retrieve data for books with bookid
4, 5, and 7. You can include as many bookid
s as you need within the parentheses, separated by commas.
Top comments (0)