Complete Latest mysql Interview Questions and Answers for Freshers and Experienced


Note: Below Interview Questions and Answers can be used by Freshers and Experienced together.

Complete Latest Mysql Question and Answers

Mysql Question and AnswersPlay Quiz On Mysql  |  More Q&A Click Here
# Question Options Answer
1 SQL data definition commands make up a(n) ________
  • DDL
  • DML
  • HTML
  • XML
  • DDL
    2 ORDER BY can be combined with the SELECT statements.
  • True
  • False
  • Not Sure
  • None
  • True
    3 Which of the following is true concerning triggers?
  • You do not create them with SQL.
  • They execute against only some applications that access a database.
  • They have an event, condition, and action.
  • They cannot cascade (cause another trigger to fire).
  • They have an event, condition, and action.
    4 The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,ORDER_T
  • Equi-join
  • Natural join
  • Outer join
  • Cartesian join
  • Cartesian join
    5 How many tables may be included with a join?
  • One
  • Two
  • Three
  • All of the above
  • All of the above
    6 Which of the following is a correlated subquery?
  • Uses the result of an inner query to determine the processing of an outer query.
  • Uses the result of an outer query to determine the processing of an inner query.
  • Uses the result of an inner query to determine the processing of an inner query.
  • Uses the result of an outer query to determine the processing of an outer query.
  • Uses the result of an outer query to determine the processing of an inner query.
    7 RDBMS is an acronym for
  • Relational Database
  • Relational Database Merging System
  • Relational Database Management System
  • Relational Database Manipulation System
  • Relational Database Management System
    8 A query is also a type of
  • Filter
  • Database
  • Form
  • Report
  • Filter
    9 A row in a table represents
  • Record
  • Field
  • File
  • Column
  • Record
    10 The entire collection of related data in a place is referred to as a
  • Table
  • Cell
  • Row
  • Column
  • Table
    11 The process of joining data from two or more tables of the same or different databases is called
  • Filtering
  • Searching
  • Sorting
  • Merging
  • Merging
    12 The process of limiting the information that appears on the screen is
  • Sorting
  • Filtering
  • Searching
  • Merging
  • Filtering
    13 You can add a row using SQL in a database with which of the following?
  • ADD
  • CREATE
  • INSERT
  • MAKE
  • INSERT
    14 The command to remove rows from a table CUSTOMER is:
  • REMOVE FROM CUSTOMER
  • DROP FROM CUSTOMER
  • DELETE FROM CUSTOMER WHERE
  • UPDATE FROM CUSTOMER
  • DELETE FROM CUSTOMER WHERE
    15 The SQL WHERE clause
  • limits the column data that are returned.
  • limits the row data are returned.
  • Both A and B are correct.
  • Neither A nor B are correct.
  • limits the row data are returned.
    16 The wildcard in a WHERE clause is useful when?
  • An exact match is necessary in a SELECT statement
  • An exact match is not possible in a SELECT statement
  • An exact match is necessary in a CREATE statement
  • An exact match is not possible in a CREATE statement
  • An exact match is not possible in a SELECT statement
    17 A view is which of the following?
  • A virtual table that can be accessed via SQL commands
  • A virtual table that cannot be accessed via SQL commands
  • A base table that can be accessed via SQL commands
  • A base table that cannot be accessed via SQL commands
  • A virtual table that can be accessed via SQL commands
    18 The command to eliminate a table from a database is:
  • REMOVE TABLE CUSTOMER
  • DROP TABLE CUSTOMER
  • DELETE TABLE CUSTOMER
  • UPDATE TABLE CUSTOMER
  • DROP TABLE CUSTOMER
    19 ON UPDATE CASCADE ensures which of the following?
  • Normalization
  • Data Integrity
  • Materialized Views
  • All of the above
  • Data Integrity
    20 Which of the following is valid SQL for an Index?
  • CREATE INDEX ID
  • CHANGE INDEX ID
  • ADD INDEX ID
  • REMOVE INDEX ID
  • CREATE INDEX ID
    21 The SQL keyword(s) ________ is used with wildcards.
  • LIKE only
  • IN only
  • NOT IN only
  • IN and NOT IN
  • LIKE only
    22 Which of the following is the correct order of keywords for SQL SELECT statements?
  • SELECT, FROM, WHERE
  • FROM, WHERE, SELECT
  • WHERE, FROM,SELECT
  • SELECT,WHERE,FROM
  • SELECT, FROM, WHERE
    23 The result of a SQL SELECT statement is a
  • report
  • form
  • file
  • table
  • table
    24 Which of the following are the five built-in functions provided by SQL?
  • COUNT, SUM, AVG, MAX, MIN
  • SUM, AVG, MIN, MAX, MULT
  • SUM, AVG, MULT, DIV, MIN
  • SUM, AVG, MIN, MAX, NAME
  • COUNT, SUM, AVG, MAX, MIN
    25 The HAVING clause does which of the following?
  • Acts like a WHERE clause but is used for groups rather than rows.
  • Acts like a WHERE clause but is used for rows rather than columns.
  • Acts like a WHERE clause but is used for columns rather than groups.
  • Acts EXACTLY like a WHERE clause.
  • Acts like a WHERE clause but is used for groups rather than rows.
    26 To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.
  • ONLY
  • UNIQUE
  • DISTINCT
  • SINGLE
  • DISTINCT
    27 Which of the following do you need to consider when you make a table in SQL?
  • Data types
  • Primary keys
  • Default values
  • All of the above
  • All of the above
    28 SQL query and modification commands make up a
  • DDL
  • DML
  • HTML
  • XML
  • DML
    29 When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s)
  • LIKE only
  • IN only
  • NOT IN only
  • Both IN and NOT IN
  • Both IN and NOT IN
    30 Which one of the following sorts rows in SQL?
  • SORT BY
  • ALIGN BY
  • ORDER BY
  • GROUP BY
  • ORDER BY
    31 To define what columns should be displayed in an SQL SELECT statement:
  • use FROM to name the source table(s) and list the columns to be shown after SELECT
  • use USING to name the source table(s) and list the columns to be shown after SELECT
  • use SELECT to name the source table(s) and list the columns to be shown after USING
  • use USING to name the source table(s) and list the columns to be shown after WHERE
  • use FROM to name the source table(s) and list the columns to be shown after SELECT
    32 SQL can be used to:
  • create database structures only
  • query database data only
  • modify database data only
  • All of the above can be done by SQL
  • All of the above can be done by SQL
    33 The SQL statement that queries or reads data from a table is
  • SELECT
  • READ
  • QUERY
  • None of the above is correct
  • SELECT
    34 The SQL keyword BETWEEN is used:
  • for ranges.
  • to limit the columns displayed.
  • as a wildcard.
  • None of the above is correct.
  • for ranges.
    35 A subquery in an SQL SELECT statement:
  • can only be used with two tables.
  • can always be duplicated by a join.
  • has a distinct form that cannot be duplicated by a join.
  • cannot have its results sorted using ORDER BY.
  • has a distinct form that cannot be duplicated by a join.
    36 The primary key is selected from the:
  • composite keys.
  • determinants.
  • candidate keys.
  • foreign keys.
  • candidate keys.
    37 Which of the following is a group of one or more attributes that uniquely identifies a row?
  • Key
  • Determinant
  • Tuple
  • Relation
  • Key
    38 When the values in one or more attributes being used as a foreign key must exist in another set of one or more attributes in another table, we have created
  • transitive dependency.
  • insertion anomaly.
  • referential integrity constraint.
  • normal form.
  • referential integrity constraint.
    39 A relation is considered a:
  • Column
  • one-dimensional table
  • two-dimensional table
  • three-dimensional table
  • two-dimensional table
    40 In the relational model, relationships between relations or tables are created by using:
  • composite keys.
  • determinants.
  • candidate keys.
  • foreign keys.
  • foreign keys.
    41 A functional dependency is a relationship between or among:
  • tables.
  • rows.
  • relations.
  • attributes.
  • attributes.
    42 Which of the following is not a restriction for a table to be a relation?
  • The cells of the table must contain a single value.
  • All of the entries in any column must be of the same kind.
  • The columns must be ordered.
  • No two rows in a table may be identical.
  • The columns must be ordered.
    43 A key:
  • must always be composed of two or more columns.
  • can only be one column.
  • identifies a row.
  • identifies a column.
  • identifies a row.
    44 An attribute is a
  • column of a table.
  • two dimensional table.
  • row of a table.
  • key of a table.
  • column of a table.
    45 Using the SQL GROUP BY phrase with a SELECT statement can help detect which of the following problems?
  • The multivalue, multicolumn problem
  • The inconsistent values problem
  • The missing values problem
  • The general-purpose remarks column problem
  • The inconsistent values problem
    46 Most of the time, modification anomalies are serious enough that tables should be normalized into:
  • 1NF
  • 2NF
  • 3NF
  • BCNF
  • BCNF
    47 Which of the following data constraints would be used to specify that the value of cells in a column must be one of a specific set of possible values?
  • A domain constraint
  • A range constraint
  • An intrarelation constraint
  • An interrelation constraint
  • A domain constraint
    48 A primary key should be defined as:
  • NULL
  • NOT NULL
  • Either of the above can be used
  • None of the above are correct
  • NOT NULL
    49 Which of the following column properties would be used to specify that cells in a column must contain a monetary value?
  • Null status
  • Data type
  • Default value
  • Data constraints
  • Data type
    50 A foreign key is:
  • a column containing the primary key of another table.
  • used to define data types.
  • used to define null status.
  • all of the above are above correct.
  • a column containing the primary key of another table.
    51 Which of the following columns is(are) are required in a table?
  • A foreign key
  • An alternate key
  • A primary key
  • A surrogate key.
  • A primary key
    52 In a 1:1 relationship, the foreign key is placed in:
  • either table without specifying parent and child tables.
  • the parent table.
  • the child table.
  • either the parent table or the child table.
  • either table without specifying parent and child tables.
    53 The identifier of an entity will become the ________ of the new table.
  • foreign key
  • main attribute
  • primary key
  • identity key
  • primary key
    54 A unique, DBMS-supplied identifier used as the primary key of a relation is called a
  • primary key.
  • foreign key.
  • composite key.
  • surrogate key.
  • surrogate key.
    55 Each entity is represented as a(n)
  • tuple.
  • table.
  • attribute.
  • file.
  • table.
    56 What type of join is needed when you wish to include rows that do not have matching values?
  • Equi-join
  • Natural join
  • Outer join
  • All of the above.
  • Outer join
    57 Which of the following is true concerning a procedure?
  • You do not create them with SQL.
  • They do not need to have a unique name.
  • They include procedural and SQL statements.
  • They are the same thing as a function.
  • They include procedural and SQL statements.
    58 A CASE SQL statement is which of the following?
  • A way to establish an IF-THEN-ELSE in SQL.
  • A way to establish a loop in SQL.
  • A way to establish a data definition in SQL.
  • All of the above.
  • A way to establish an IF-THEN-ELSE in SQL.
    59 Which of the following statements is true concerning routines and triggers?
  • Both consist of procedural code.
  • Both have to be called to operate.
  • Both run automatically.
  • Both are stored in the database.
  • Both consist of procedural code.
    60 What type of join is needed when you wish to return rows that do have matching values?
  • Equi-join
  • Natural join
  • Outer join
  • All of the above.
  • All of the above.
    61 What is the process of defining more than one method in a class differentiated by method signature?
  • Function overriding
  • Function overloading
  • Function doubling
  • None of the mentioned
  • Function overloading