English

Using the table SALE of CARSHOWROOM database, write SQL queries for the following: a) Display the InvoiceNo and commission value rounded off to zero decimal places.

Advertisements
Advertisements

Question

Using the table SALE of CARSHOWROOM database, write SQL queries for the following:

  1. Display the InvoiceNo and commission value rounded off to zero decimal places.
  2. Display the details of SALE where payment mode is credit card..
Code Writing
Advertisements

Solution

a)

SELECT InvoiceNo, ROUND(Commission, 0) AS RoundedCommission 
FROM SALE;

b) 

SELECT * 
FROM SALE 
WHERE PaymentMode = 'Credit Card';
shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Querying and SQL Functions - Intext Questions [Page 7]

APPEARS IN

NCERT Informatics Practices [English] Class 12
Chapter 1 Querying and SQL Functions
Intext Questions | Q 1. | Page 7
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×