MySQL MCQ's Set-2





21. How much character are allowed to create database name?

    a) 55

    b) 72

    c) 64

    d) 40

ANS: C


22. In a SELECT with a GROUP BY clause, a WHERE clause, and a HAVING clause, the                    WHERE conditions are applied before the HAVING conditions.

    a) True

    b) False

    c) Either True or False

    d) None of the above

ANS: a


23. Which statement is used to count number of rows in table?

    A. SELECT COUNT(*) FROM table_name;

    B. SELECT COUNT ALL(*) FROM table_name;

    C. SELECT ROWS(*) FROM table_name;

    D. All the above

ANS : A


24. Which command returns current version on MySQL?

    A. SELECT MySQLVERSION();

    B. SELECT VERSION(“MySQL”);

    C. SELECT VERSION();

    D. All the above

ANS : C


25. Which clause is used to sort the result of SELECT statement?

    A. SORT BY

    B. ORDER BY

    C. ARRENGE BY

    D. None of the above

ANS : B


26. Which datatypes are treaded as arrays

    A. Integer

    B. Float

    C. String

    D. Booleans

ANS: C


27. In order to add a new column to an existing table in SQL, we can use the command

    A. MODIFY TABLE

    B. EDIT TABLE

    C. ALTER TABLE

    D. ALTER COLUMNS

ANS : C


28. Which of the following ways below are the correct way to get the current date?

    A. SELECT CURTIME();

    B. SELECT CURDATE();

    C. SLELCT CURRRENT_TIME()

    D. All of the above

ANS: D


29. Commit command is used for

    A. To restore the old values

    B. To save the current table

    C. To save the current transaction

    D. To recover the old table

ANS: C


30. A table that displays data redundancies yields ________ anomalies

    A. Insertion

    B. Deletion

    C. Update

    D. All of the above

ANS: D


31.The value of Primary key

    A. can be duplicated

    B. can be null

    C. cannot be null

    D. none of these

ANS: C


32. MVD is called as

    A. Many Value Dependency

    B. More Value Dependency

    C. Multi Value Dependency

    D. All of the Above

ANS: C


33. Drop table structure is

    A. DML Statement

    B. DDL Statement

    C. Query Statement

    D. None of the above

ANS: B


34. In SQL, __________ is an Aggregate function.

    A. SELECT

    B. CREATE

    C. AVG

    D. MODIFY

ANS: C


35. The primary key is selected from the:

    A. composite keys.

    B. determinants

    C. foreign keys

    D. candidate keys

ANS: D


36. If there is more than one key for relation schema in DBMS then each key in relation schema is classified as

    A. Prime key

    B. Super key

    C. Candidate key

    D. Primary key

ANS: C


37. Which join refers to join records from the write table that have no matching key in the left table are include in the result set:

    A. Left outer join

    B. Full outer join

    C. Right outer join

    D. Half outer join

ANS: C


38. Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?

    A. Candidate key

    B. Sub key

    C. Super key

    D. Foreign key

ANS: C


39. A _____ is a property of the entire relation, rather than of the individual tuples in which each tuple is unique.

    A. Rows

    B. Key

    C. Attribute

    D. Fields

ANS: B


40. A attribute in a relation is a foreign key if the _______ key from one relation is used as an attribute in that relation .

    A. Candidate

    B. Primary

    C. Super

    D. Sub

ANS: B




                                                                                                                            

Popular Posts