Dewie Dewie - 1 month ago 7x
SQL Question

How to specify a group of years in a table in SQL

Basic SQL question about specifying a group of years in a table. Working on a database and it is wanting me to list the author, title, publication date and retail price. I have that part down but its also ask to output all titles that start with "D" and were published in the 1970s.

I have the first part down: (this is how we are taught btw)

SELECT `fAuthorID`,`fTitle`,`fPubYear`,`fRetailPrice`
FROM `tBooks`

But I cant seem to be able to get it to output the authors with a "D" and years 1970-1979 to display.

SELECT fauthorID, fTitle, fPubYear, fReatailPrice
FROM tbooks
WHERE fTitle Like 'D%' AND fPubYear Like '197_'