My Report

MySQL Practice Test 10


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. What will be the result of the following MySQL command?

WHERE end_date IS NULL 
AND NOT (title=’teller’ OR start_date < ‘2007-01-01’)

2. What will be the result of the following MySQL command?

WHERE end_date IS NULL 
AND (title=’teller’ OR start_date < ‘2007-01-01’)

3. Which among the following operators is/are belongs to “Equality conditions”?

4. If emp_id contain the following set {1, 2, 2, 3, 3, 1}, what will be the output on execution of the following MySQL statement?

SELECT emp_id
FROM person
ORDER BY emp_id;

5. What will be the output of the following MySQL statement?

SELECT account_id, product_id, cust_id
FROM account
WHERE product_id IN (‘sav’, ‘chd’, ‘mm’);

6. Consider a database name “Sanfoundry” whose attributes are intern_id (primary key), subject.
Intern_id = {1, 2, 3, 4, 5, 6}
Subject = {sql, oop, sql, oop, c, c++}
If these are one to one relation then what will be the output of the following MySQL statement?

SELECT intern_id
FROM sanfoundry
Where subject IN (c, c++, oop);

7. What will be the output of the following MySQL command?

SELECT *
FROM employee
WHERE (title=’HEAD TELLER’) OR (start_date>2013-01-24);

8. Which among the following operators is/are belongs to “Inequality conditions”?

9. What will be the output of the following MySQL statement “false OR Null”?

10. Which command is used to create “Temporary tables” in MySQL?


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.