Mysql Multiple Choice Questions

  1. DDL is used for _______?
    1. Manage the changes made by DML statements
    2. Defining database schema
    3. Control access to data stored in a database
    4. None of the above
Answer :
B
Explanation:
A Data Definition Language or Data Description Language (DDL) is used for defining data structures, especially database schemas. eg. CREATE, DROP, ALTER, TRUNCATE
Added By : Amitosh

  1. DML is used for _______?
    1. Control access to data stored in a database
    2. Defining database schema
    3. Inserting, Deleting and Updating data
    4. None of the above
Answer :
C
Explanation:
A Data Manipulation Language (DML) is used for inserting, deleting and updating data in a database. eg. SELECT, INSERT, UPDATE, DELETE.
Added By : Amitosh


  1. Which is right statement to insert multiple records?
    1. INSERT INTO job_question VALUES ('col1', 'col2'), ('col1', 'col2'), ...
    2. INSERT INTO job_question VALUES ('col1', 'col2'), VALUES ('col1', 'col2'), ...
    3. A and B Both
    4. None of the above
Answer :
A
Explanation:
Added By : Akash

  1. Query result can be displayed vertically by terminating the query____?
    1. With \V instead of a semicolon
    2. With \G instead of a semicolon
    3. With \M instead of a semicolon
    4. All the above
Answer :
B
Explanation:
Added By : Deeksha

  1. Which command is used to import data form text file in MySQL on MySQL editor?
    1. mysql> source text_file_path;
    2. mysql> \. text_file_path
    3. None of the above
    4. A and B Both
Answer :
D
Explanation:
Added By : Deeksha

  1. Which is right statement to import data from text file in MySQL on shell editor?
    1. shell> mysql -host host_name -u user_name -p password db_name < text_file
    2. shell> mysql -host host_name -u user_name -p password db_name > text_file
    3. shell> mysql < text_file
    4. All the above
Answer :
A
Explanation:
Added By : Deeksha


  1. The DISTINCT keyword used along with the SELECT keyword retrieves ______ ?
    1. Duplicate data depending on the column list
    2. Unique data depending on the column list
    3. Sorted data depending on the column list
    4. None of the above
Answer :
B
Explanation:
SELECT DISTINCT id FROM job_question;
Added By : Rajat

  1. Which clause is used to sort the result of SELECT statement?
    1. SORT BY
    2. ORDER BY
    3. ARRENGE BY
    4. None of the above
Answer :
B
Explanation:
SELECT id, question FROM interview_question ORDER BY question;
Added By : Rajat

Social Sharing
Search