[go: up one dir, main page]

0% found this document useful (0 votes)
1K views3 pages

MCQ MySQL

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 3

MCQ MySQL

1. Which command is used to add a new row?


a. Insert
b. create
c. update
d. add
Answer: Insert

2. Which command is used to change the database?


a. Open
b. Change
c. Use
d. Select
Answer: Use

3. Command to remove the row(s) from table student is


a. drop table student;
b. drop from student;
c. remove from student;
d. delete from student;
Answer: delete from student;

4. Which is not a MySQL function?


a. Mult()
b. Min()
c. Count()
d. Sum()
Answer: Mult()

5. Which is not a category of SQL command?


a. DDL
b. XML
c. DML
d. TCL
Answer: XML

6. Which command is used to close the MySQL Software/application?


a. exit();
b. Close();
c. Close;
d. exit;
Answer: exit;

7. Which command is used to modify rows in a table.


a. Delete
b. Update
c. Alter
d. Modify
Answer: Update

8. Number of rows in a relation is known as


a. Degree
b. Cardinality
c. Cartesian Product
d. Attribute
Answer: Cardinality

9. Which clause is used to group the column(s) with aggregate function?


a. Order by
b. Like
c. Where
d. Group by
Answer: Group by

10. A Table customer contains 5 rows and 7 columns. What will be its cardinality and
degree?
a. Degree 7, Cardinality 5.
b. Degree 5, Cardinality 7.
c. Degree 5, Cardinality 7.
d. Cardinality 7, Degree 7.
Answer: Degree 7, Cardinality 5.
11. Name the clause used to remove duplicate rows from the result of SQL select
statement.
a. Unique
b. Primary Key
c. Distinct
d. Candidate Key
Ans. Distinct

12. Alter is _____________ command.


a. DDL
b. DML
c. TCL
d. DCL
Ans. DDL

13. Structure of the table can be seen by:


a. Select
b. Show
c. Print
d. Desc
Ans Desc

14. Which clause is used to filter the rows in a relation?


a. Group By
b. Where
c. Order By
d. IN
Ans. Where

15. Which clause is used to arrange rows of a relation?


a. Group By
b. Where
c. Order By
d. IN
Ans. Order By

16. Name the key used to uniquely identify row in a table and also does not accept NULL
values.
a. Primary Key
b. Foreign Key
c. Unique Key
d. All of Above
Ans. Primary Key

You might also like