Computer Science - Informatics Practices Class XI/XII MySQL Test Series Part 9

Computer Science - Informatics Practices Class XI/XII MySQL Test Series Part 9

Q1. What do you mean by aggregate function?

Q2. Which keyword is used to arrange records in increasing or decreasing order?

Q3. Which function returns the total number of records in a table?

Q4. Select count( * ) from student; return 5

       Select count(fee) from student; return 4

why different output in above two queries?

Q5. ____________ function return the average value of a numeric column.

Q6. Which function returns the sum of numeric column?

Q7. _______ keywords removes duplicates records from the table.

Q8. Write a query to display all the records of table student whose name starts from "A"

Q9. Identify the error in the following statement.

Select * from student where name = null

Q10. Which function return the minimum value from column fee of table student?


 SOLUTIONS

Q1. What do you mean by aggregate function?

Ans. A function which work on multiple values and return a single value.

Q2. Which keyword is used to arrange records in increasing or decreasing order?

Ans. Order by

Q3. Which function returns the total number of records in a table?

Ans. Count( )

Q4. Select count( * ) from student; return 5

       Select count(fee) from student; return 4

why different output in above two queries?

Ans. Different output shows that there must be one null value in column fee.

Q5. ____________ function return the average value of a numeric column.

Ans. avg( )

Q6. Which function returns the sum of numeric column?

Ans. sum( )

Q7. _______ keywords removes duplicates records from the table.

Ans. distinct

Q8. Write a query to display all the records of table student whose name starts from "A"

Ans. Select * from student where name like "A%";

Q9. Identify the error in the following statement.

Select * from student where name = null

Ans. Select * from student where name is null; 

Q10. Which function return the minimum value from column fee of table student?

Ans. min( )


No comments:

Post a Comment

Most Recently Published

File Handling Test 6

 File Handling Test 6 Q1 . Do we need to use the close() function when we use 'with' statement to open a file? Q2. Which mode you wi...

CS - IP Assignment/Worksheet