Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

1 SELECT Name FROM Library WHERE Price BETWEEN 600 AND ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation and Management

Authors: Carlos Coronel, Steven Morris

11th edition

9781305323230, 1285196147, 1305323238, 978-1285196145

More Books

Students also viewed these Databases questions

Question

Calculate the number of neutrons of 239Pu.

Answered: 1 week ago