Advertisements
Advertisements
प्रश्न
Rahul, who works as a database designer, has developed a database for a bookshop. This database includes a table BOOK whose column (attribute) names are mentioned below:
BCODE
: Shows the unique code for each book. TITLE
: Indicates the book’s title. AUTHOR
: Specifies the author’s name. PRICE
: Lists the cost of the book.
Table: BOOK
BCODE | TITLE | AUTHOR | PRICE |
B001 | MIDNIGHT'S CHILDREN | SALMAN RUSHDIE | 500 |
B002 | THE GOD OF SMALL THINGS | ARUNDHATI ROY | 450 |
B003 | A SUITABLE BOY | VIKRAM SETH | 600 |
B004 | THE WHITE TIGER | ARAVIND ADIGA | 399 |
B005 | TRAIN TO PAKISTAN | KHUSHWANT SINGH | 350 |
- Write SQL query to display book titles in lowercase.
- Write SQL query to display the highest price among the books.
- Write SQL query to display the number of characters in each book title.
- Write SQL query to display the Book Code and Price sorted by Price in descending order.
लघु उत्तर
उत्तर
- SELECT LOWER(TITLE) FROM BOOK;
- SELECT MAX(PRICE) FROM BOOK;
- SELECT LENGTH(TITLE) FROM BOOK;
- SELECT BCODE, PRICE FROM BOOK ORDER BY PRICE DESC;
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?