MCQOPTIONS
Saved Bookmarks
This section includes 27 Mcqs, each offering curated multiple-choice questions to sharpen your Mysql knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
In the following query * stands for SELECT * FROM Employee; |
| A. | Retrieve data of primary key only |
| B. | Retrieve NULL data |
| C. | Retrieve all data from the table |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |
| 2. |
In the following query Employee stands forSELECT Emp_id, fname, lname, Birth_date FROM Employee; |
| A. | Attribute |
| B. | Multivalued attribute |
| C. | Table name |
| D. | All of above |
| E. | None of these |
| Answer» B. Multivalued attribute | |
| 3. |
What will be the output of a query given below?SELECT *FROM Employee; |
| A. | Show all columns of table Employee |
| B. | Show all rows and columns of table Employee |
| C. | Show all rows of table Employee |
| D. | All of above |
| E. | None of these |
| Answer» C. Show all rows of table Employee | |
| 4. |
Find the error?SELECT *; |
| A. | No table mentioned |
| B. | Depends |
| C. | No Error |
| D. | All of these |
| E. | None of these |
| Answer» B. Depends | |
| 5. |
What will be the output of a query given below?SELECT Employee_id, FirstName, LastNameFROM person; |
| A. | Show all columns except (Employee_id, FirstName, LastName) |
| B. | Show all rows |
| C. | Show only columns (Employee_id, FirstName, LastName) |
| D. | Show only columns (Employee_id, FirstName, LastName) and rows related to these columns |
| E. | None of these |
| Answer» E. None of these | |
| 6. |
Is there any error in executing the following query?SELECT USER (),VERSION (), DATABASE (); |
| A. | Depends |
| B. | Yes, FROM is not used |
| C. | No |
| D. | Undefined behaviour |
| E. | None of these |
| Answer» D. Undefined behaviour | |
| 7. |
Is there any error in executing the following query?SELECT Student_id, ACTIVE ,Student_id * 3.145,UPPER (LastName)FROM Student; |
| A. | NO |
| B. | Depends on condition |
| C. | Yes |
| D. | Undefined behaviour |
| E. | None of these |
| Answer» B. Depends on condition | |
| 8. |
If in Table Customer , a column Customer_id consists of {1,2,2,3,3,5,6,7,8,8} then what will be the output on executing the following query?SELECT DISTINICT emp_idFROM employee; |
| A. | {1,2,3,5,6,7,8} |
| B. | { } |
| C. | {1,2,2,3,3,5,6,7,8,8} |
| D. | All of above |
| E. | None of these |
| Answer» B. { } | |
| 9. |
If in Table account , a column Customer_id consists of {1,2,2,3,3,5,6,7,8,8} then what will be the output on executing the following query?SELECT DISTINICT Customer_idFROM account; |
| A. | {1, 2, 3, 5, 6, 7, 8} |
| B. | { } |
| C. | {1, 2, 2, 3, 3, 5, 6, 7, 8, 8} |
| D. | All of above |
| E. | None of these |
| Answer» B. { } | |
| 10. |
What will be the result of the query given below?SELECT Person_id, ACTIVE AS STATUS,Person_id * 3.14 AS Person_pi,UPPER (LName) AS Last_NameFROM Person; |
| A. | Error |
| B. | Person_id, ACTIVE, Person_id * 314, UPPER(LName) |
| C. | Person_id, Status, Person_pi, Last_Name |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |
| 11. |
What will be the result of the query given below?SELECT Student_id, ACTIVE STATUS,Student_id * 3.14 Student_pi,UPPER (LName) Last_NameFROM Student; |
| A. | Error |
| B. | Student_id, ACTIVE, Student_id * 314, UPPER(LName) |
| C. | Student_id, Status, Student_pi, Last_Name |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |
| 12. |
What will be the output of a query given below?SELECT Employee_id, FirstName, LastNameFROM EmployeeWHERE Employee_id=1; |
| A. | Show all columns and rows |
| B. | Shows only columns Employee_id |
| C. | Show only columns(Employee_id, FirstName, LastName) but only those rows which belongs to Employee_id=1 |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |
| 13. |
What will be the output of a query given below?SELECT * FROM EmployeeWHERE Employee_id=1; |
| A. | Show all columns and rows |
| B. | Shows only columns Employee_id |
| C. | Show all columns but only those rows which belongs to Employee_id=1 |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |
| 14. |
In the following query * stands for |
| A. | Retrieve data of primary key only |
| B. | Retrieve NULL data |
| C. | Retrieve all data from the table |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |
| 15. |
In the following query Employee stands for |
| A. | Attribute |
| B. | Multivalued attribute |
| C. | Table name |
| D. | All of above |
| E. | None of these |
| Answer» B. Multivalued attribute | |
| 16. |
If in Table Customer , a column Customer_id consists of {1,2,2,3,3,5,6,7,8,8} then what will be the output on executing the following query? |
| A. | {1,2,3,5,6,7,8} |
| B. | { } |
| C. | {1,2,2,3,3,5,6,7,8,8} |
| D. | All of above |
| E. | None of these |
| Answer» B. { } | |
| 17. |
If in Table account , a column Customer_id consists of {1,2,2,3,3,5,6,7,8,8} then what will be the output on executing the following query? |
| A. | {1, 2, 3, 5, 6, 7, 8} |
| B. | { } |
| C. | {1, 2, 2, 3, 3, 5, 6, 7, 8, 8} |
| D. | All of above |
| E. | None of these |
| Answer» B. { } | |
| 18. |
Which Keyword is used to remove duplicate rows in result set? |
| A. | MODIFY |
| B. | DISTINCT |
| C. | DISTINCTS |
| D. | All of above |
| E. | None of these |
| Answer» C. DISTINCTS | |
| 19. |
What will be the result of the query given below? |
| A. | Error |
| B. | Student_id, ACTIVE, Student_id * 314, UPPER(LName) |
| C. | Student_id, Status, Student_pi, Last_Name |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |
| 20. |
What is the meaning of SELECT clause in Mysql? |
| A. | Show me all columns |
| B. | Show me all rows |
| C. | Show me all Columns and rows |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |
| 21. |
What is the need of column Aliases in SELECT clause? |
| A. | To overwrite the existing column name in result set |
| B. | To modify the column name while using literals, Expression, built_in functions with SELECT clause |
| C. | To assign a new label to the column in result set |
| D. | All of above |
| E. | None of these |
| Answer» E. None of these | |
| 22. |
Which among the following can also be included with SELECT clause while writing query in Mysql? |
| A. | User defined functions |
| B. | Literals |
| C. | Expressions |
| D. | All of above |
| E. | None of these |
| Answer» E. None of these | |
| 23. |
Which clause is mandatory with clause SELECT in Mysql? |
| A. | WHERE |
| B. | FROM |
| C. | Both WHERE and FROM |
| D. | CREATE |
| E. | None of these |
| Answer» C. Both WHERE and FROM | |
| 24. |
Is there any error in executing the following query? |
| A. | NO |
| B. | Depends on condition |
| C. | Yes |
| D. | Undefined behaviour |
| E. | None of these |
| Answer» B. Depends on condition | |
| 25. |
Find the error? |
| A. | No table mentioned |
| B. | Depends |
| C. | No Error |
| D. | All of these |
| E. | None of these |
| Answer» B. Depends | |
| 26. |
What will be the output of a query given below? |
| A. | Show all columns except (Employee_id, FirstName, LastName) |
| B. | Show all rows |
| C. | Show only columns (Employee_id, FirstName, LastName) |
| D. | Show only columns (Employee_id, FirstName, LastName) and rows related to these columns |
| E. | None of these |
| Answer» E. None of these | |
| 27. |
Can SELECT clause be used without the clause FROM ? |
| A. | DEPENDS |
| B. | YES |
| C. | NO |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |