Write the SQL statements for the following Library and Student tables. Write a query to show name
Fantastic news! We've Found the answer you've been seeking!
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 a query to list name of books that start with ‘D’.
- Write a query to show distinct book names.
- Write a query to show only three records from library in ascending Order.
- Write a query to list name of books having quantity greater than 30.
- Write a query to list name of books having same quantity and same issue date.
- Write a query to list name of student along with book issued to them.
- Write query to show all students either book issued them or not.
- Create a view named “student detail” that display book ID, NAME, ISSUE DATE, STUDENT NAME, SEMESTER.
- Write a query to grant Select and update privileges on library table to a student Ali ..
- 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 |
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris
Posted Date: