Question: Write the SQL statements for the following Library and Student tables. Write a query to show name of books having price between 600 to 800.

Write the SQL statements for the following Library and Student tables.                                   

  1. Write a query to show name of books having price between 600 to 800.
  2. Write a query to list name of books that start with ‘D’.
  3. Write a query to show distinct book names.
  4. Write a query to show only three records from library in ascending Order.
  5. Write a query to list name of books having quantity greater than 30.
  6. Write a query to list name of books having same quantity and same issue date.
  7. Write a query to list name of student along with book issued to them.
  8. Write query to show all students either book issued them or not. 
  9. Create a view named “student detail” that display book ID, NAME, ISSUE DATE, STUDENT NAME, SEMESTER.
  10. Write a query to grant Select and update privileges on library table to a student Ali ..
  11. Write a query to revoke back all rights from a particular user on a table.
Book_ID
Name
price
Quantity
Issue_date
101
JAVA
950
10
03-02-2019
102
DBMS
800
40
05-02-2019
103
PHP
750
30
07-02-2019
104
C++
650
60
08-02-2019
104
DS
870
10
03-02-2019
StudentID

STD_NAME

SEMESTER

bookID
1
ALI
1st
102
2
AHMED
2nd
104
3
WAHAN
3rd
103

Step by Step Solution

3.39 Rating (168 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 SELECT Name FROM Library WHERE Price BETWEEN 600 AND ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!