Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

BCM ARYA MODEL SR. SEC.

SCHOOL

Shastri Nagar Ludhiana

Subject-Informatics Practices Class -XII Chapter -MySQL

write the output of the following along with the data type of
returning value/output:

select curdate();

select sysdate();

select sysdate()+1;

select curdate()+1;

select now();

select date(sysdate());

select day(sysdate());

select dayname(sysdate());

select month(sysdate());

select monthname(sysdate());

select sysdate(),sleep(5), sysdate();

select now(),sleep(5),now();

Fill in the blanks

1. _________calculates the average of a set of values.


2. __________ counts rows in a specified table or view.
3. ___________ gets the minimum value in a set of values.
4. ____________ gets the maximum value in a set of values.
5. ___________ calculates the sum of values.

D). Explain why the following queries give different outputs on execution:

i. SELECT COUNT(ENAME) FROM EMP;

Output: 5

ii. SELECT Count(*) FROM EMP;

Output: 8

E).Find out the correct answer for the given Query:

Select avg(rate) from inventory ;

Note: There are total 6 rows in the table inventory, but rate column is having 2
NULL values .

a. (20+22+22+22)/4

b.(20+22+22+22)/6

C. given query will show Error

Compiled by: Mrs. Ambica Soni

You might also like