Give the SQL statements output for the following data reque

Give the SQL statements & output for the following data requests:


Please List the title and publish date of any computer book published in 2005. Perform the taskof searching for the publish date by using three different methods: a) a range operator,b) a logical operator, and c) a search pattern operation.

Solution

lease List the title and publish date of any computer book published in 2005. Perform the taskof searching for the publish date by using three different methods: a) a range operator,b) a logical operator, and c) a search pattern operation.


a )range operator
SELECT Title, PublishDate from Books where (PublishDate BETWEEN \'2005-01-01\' AND \'2005-12-31\') AND (Category=\'Computer\');

b)logical operator, and
SELECT Title, PubDate FROM Books WHERE PublishDate >= \'2005-01-01\' AND PublishDate <= \'2005-12-31\' AND Category=\'Computer\');

c) search pattern operation.
SELECT Title, PublishDate FROM Books where (PublishDate like \'2005%\') AND (Category=\'Computer\');

Give the SQL statements & output for the following data requests: Please List the title and publish date of any computer book published in 2005. Perform the

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site