Consider the following table and write the output of the following SQL Queries.
Table : ORDERS
| ORDERID | CUSTOMERNAME | TOTALAMOUNT | DISCOUNT | ORDERDATE |
|---|---|---|---|---|
| 101 | Hemant | 5000 | 10 | 2024–03-01 |
| 102 | Neha | 7000 | 15 | NULL |
| 103 | Keshav | 3000 | 5 | 2024–01-20 |
| 104 | Sandhya | 4500 | NULL | 2023-12-25 |
Write the output of the following SQL Queries:
I. SELECT CUSTOMERNAME FROM ORDERS WHERE DISCOUNT IS NOT NULL;
II. SELECT CUSTOMERNAME, DISCOUNT FROM ORDERS WHERE DISCOUNT BETWEEN 5 AND 10;
III. SELECT MONTHNAME(ORDERDATE) FROM ORDERS WHERE ORDERDATE IS NOT NULL;
IV. SELECT ORDERID, DAY(ORDERDATE) FROM ORDERS;
What will be the result of the following SQL command?
SELECT LENGTH('Data Base');(Note: There is single space between the words Data and Base.)
State whether the following statement is True or False:
The INSTR(stringl, string2) function in SQL returns 0 if string2 is not present as a substring in string1.
What will be the result of the following SQL command?
SELECT ROUND(15.678, 2);Write SQL queries to perform the following:
(I) Display the month (in numeric form) of the date '2026-01-01'.
(II) Display only the year part from the date '2026-01-01'.