KnowledgeBoat Logo

Class - 12 CBSE Computer Science Important Output Questions 2025

Write the output produced by the following SQL commands:

(a) SELECT POW(2,3);

(b) SELECT ROUND(123.2345, 2) ,ROUND(342.9234,-1);

(c) SELECT LENGTH("Informatics Practices");

(d) SELECT YEAR("1979/11/26"), MONTH("1979/11/26"), MONTHNAME("1979/11/26"), DAY("1979/11/26");

(e) SELECT LEFT("INDIA", 3), RIGHT("Computer Science", 4);

(f) SELECT MID("Informatics", 3,4), SUBSTR("Practices", 3);

(g) SELECT CONCAT("You Scored", LENGTH("123") , "rank");

(h) SELECT ABS(-67.89);

(i) SELECT SQRT(625) + ROUND(1234.89, -3);

(j) SELECT MOD(56, 8);

SQL Queries

7 Likes

Answer

(a)

Output
+-----------+
| POW(2, 3) |
+-----------+
|         8 |
+-----------+

(b)

Output
+--------------------+--------------------+
| ROUND(123.2345, 2) | ROUND(342.9234,-1) |
+--------------------+--------------------+
|             123.23 |                340 |
+--------------------+--------------------+

(c)

Output
+---------------------------------+
| LENGTH("Informatics Practices") |
+---------------------------------+
|                              21 |
+---------------------------------+

(d)

Output
+--------------------+---------------------+-------------------------+-------------------+
| YEAR("1979-11-26") | MONTH("1979-11-26") | MONTHNAME("1979-11-26") | DAY("1979-11-26") |
+--------------------+---------------------+-------------------------+-------------------+
|               1979 |                  11 | November                |                26 |
+--------------------+---------------------+-------------------------+-------------------+

(e)

Output
+------------------+------------------------------+
| LEFT("INDIA", 3) | RIGHT("Computer Science", 4) |
+------------------+------------------------------+
| IND              | ence                         |
+------------------+------------------------------+

(f)

Output
+-------------------------+------------------------+
| MID("Informatics", 3,4) | SUBSTR("Practices", 3) |
+-------------------------+------------------------+
| form                    | actices                |
+-------------------------+------------------------+

(g)

Output
+----------------------------------------------+
| CONCAT("You Scored", LENGTH("123") , "rank") |
+----------------------------------------------+
| You Scored3rank                              |
+----------------------------------------------+

(h)

Output
+-------------+
| ABS(-67.89) |
+-------------+
|       67.89 |
+-------------+

(i)

Output
+--------------------------------+
| SQRT(625) + ROUND(1234.89, -3) |
+--------------------------------+
|                           1025 |
+--------------------------------+

(j)

Output
+------------+
| MOD(56, 8) |
+------------+
|          0 |
+------------+

Answered By

3 Likes