MCQOPTIONS
Saved Bookmarks
This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
From the following statements which of them is/are true about SQL1. All attributes used in the group by clause must appear in the select clause2. An SQL query can contain a having clause only if it has a group by clause3. An SQL query can contain a having clause even if it does not have a group by clause4. Not all attributes used in the group by clause need to appear in the select clause |
| A. | 3 and 4 |
| B. | 1 and 2 |
| C. | 1,3 and 4 |
| D. | All of the above |
| Answer» B. 1 and 2 | |
| 2. |
Consider the following set of relationsEMP ( emp_no,emp_name,dept_no,salary)DEPT (dept_no,dept_name,location)Write SQL query for the following Find all the employees whose departments are located in 'Mumbai' and salary is greater than Rs. 20,000. |
| A. | select emp_name from dept where dept_no and location='Mumbai'; |
| B. | select emp_name from emp where salary > 20,000 and dept_no in (select dept_no from dept where location = 'Mumbai'); |
| C. | select dept_no ,count(emp_no) from emp where salary > 50,000 group by dept_no; |
| D. | update table emp where emp_name='Mumbai'; |
| Answer» C. select dept_no ,count(emp_no) from emp where salary > 50,000 group by dept_no; | |
| 3. |
Which SQL command is used to insert a row in a table? |
| A. | Select |
| B. | Create |
| C. | Insert |
| D. | Drop |
| Answer» D. Drop | |
| 4. |
What are the different types of joins?1. Outer join 2. Inner join3. Right join 4. Left join5. Full join |
| A. | 1 and 3 |
| B. | 4 and 5 |
| C. | 3,4 and 5 |
| D. | All of the above |
| Answer» E. | |