MySQL Online Aptitude Test 1

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Rushikesh
R
Rushikesh
Community Contributor
Quizzes Created: 4 | Total Attempts: 3,692
Questions: 15 | Attempts: 2,123

SettingsSettingsSettings
MySQL Online Aptitude Test 1 - Quiz

The test contains 15 questions and there is no time limit.
The test is not official, it's just a nice way to see how much you know, or don't know, about SQL.

Count Your Score
You will get 1 point for each correct answer. At the end of the Quiz, your total score will be displayed. Maximum score is 15 points.
Good luck


Questions and Answers
  • 1. 

    What does SQL stands for?

    • A.

      Structure query language

    • B.

      Strong question language

    • C.

      Structured question language

    • D.

      Separate query language

    Correct Answer
    A. Structure query language
    Explanation
    SQL stands for Structured Query Language. It is a programming language used for managing and manipulating relational databases. SQL allows users to create, retrieve, update, and delete data from databases. It is widely used in database management systems and plays a crucial role in data analysis and reporting.

    Rate this question:

  • 2. 

    What is the use of SQL?

    • A.

      Storing data in database

    • B.

      Manipulating data in database

    • C.

      Retrieving data in database

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    SQL (Structured Query Language) is a programming language used for managing and manipulating relational databases. It is used for various purposes such as storing data in databases, manipulating data by performing operations like inserting, updating, and deleting records, and retrieving data by querying the database using SELECT statements. Therefore, the correct answer is "All of the above" as SQL is used for all these purposes in database management.

    Rate this question:

  • 3. 

    Which SQL statement is used to extract data from the database?

    • A.

      SELECT

    • B.

      ACCESS

    • C.

      OPEN

    • D.

      GET

    Correct Answer
    A. SELECT
    Explanation
    The SELECT statement is used in SQL to extract or retrieve data from a database. It allows you to specify the columns and tables you want to retrieve data from, as well as any filters or conditions for the data. The SELECT statement is one of the fundamental and most commonly used statements in SQL for querying and retrieving data.

    Rate this question:

  • 4. 

    Which SQL statement is used to return only different values?

    • A.

      DUPLICATE

    • B.

      DISTINCT

    • C.

      DIFFERENT

    • D.

      SELECT

    Correct Answer
    B. DISTINCT
    Explanation
    The correct answer is DISTINCT. The DISTINCT keyword is used in SQL to retrieve only unique values from a column or set of columns in a table. It eliminates duplicate values and returns a result set with distinct values. Therefore, the DISTINCT keyword is the appropriate SQL statement to use when you want to return only different values.

    Rate this question:

  • 5. 

    Which of the right syntax for DISTINCT SQL statement?

    • A.

      SELECT DIFFERENT column1, column2, ... FROM table_name;

    • B.

      SELECT DISTINCT column1, column2, ... WHERE table_name;

    • C.

      SELECT DISTINCT column1, column2, ... FROM table_name;

    Correct Answer
    C. SELECT DISTINCT column1, column2, ... FROM table_name;
    Explanation
    The correct answer is "SELECT DISTINCT column1, column2, ... FROM table_name;". This is the correct syntax for using the DISTINCT keyword in an SQL statement. It allows you to retrieve unique values from the specified columns in the table_name.

    Rate this question:

  • 6. 

    You can add a row using SQL in a database with which of the following?

    • A.

      ADD

    • B.

      CREATE

    • C.

      INSERT

    • D.

      MAKE

    Correct Answer
    C. INSERT
    Explanation
    In SQL, the INSERT statement is used to add a new row or multiple rows into a table in a database. It allows you to specify the values for each column in the new row(s) being added. The INSERT statement is commonly used to add data into an existing table. Therefore, the correct answer is INSERT.

    Rate this question:

  • 7. 

    The command to remove rows from a table 'CUSTOMER' is:

    • A.

      REMOVE FROM CUSTOMER

    • B.

      DROP FROM CUSTOMER

    • C.

      DELETE FROM CUSTOMER WHERE

    • D.

      UPDATE FROM CUSTOMER

    Correct Answer
    C. DELETE FROM CUSTOMER WHERE
    Explanation
    The correct answer is "DELETE FROM CUSTOMER WHERE." This command is used to remove rows from a table called 'CUSTOMER' based on certain conditions specified in the WHERE clause. It allows for selective removal of rows, making it a suitable command for deleting specific data from the table.

    Rate this question:

  • 8. 

    Which command is used to specify the number of records to return?

    • A.

      SELECT

    • B.

      SELECT TOP

    • C.

      EXTRACT

    • D.

      SELECT SPECIFIC

    Correct Answer
    B. SELECT TOP
    Explanation
    The command "SELECT TOP" is used to specify the number of records to return in a SQL query. It allows you to limit the result set to a specific number of rows, which can be useful when you only need a certain number of records from a large table. By using the "SELECT TOP" command, you can easily retrieve a specific number of records based on your requirements.

    Rate this question:

  • 9. 

    The SQL WHERE clause?

    • A.

      Limits the column data that are returned

    • B.

      Limits the row data are returned

    • C.

      Both A and B are correct

    • D.

      Neither A nor B are correct

    Correct Answer
    B. Limits the row data are returned
    Explanation
    The correct answer is "Limits the row data that are returned". The WHERE clause in SQL is used to filter rows based on specified conditions. It allows you to specify a condition that must be met for a row to be included in the result set. By using the WHERE clause, you can limit the rows that are returned from a table based on certain criteria, such as a specific column value or a combination of column values. Therefore, the WHERE clause limits the row data that is returned, not the column data.

    Rate this question:

  • 10. 

    The wildcard in a WHERE clause is useful when?

    • A.

      An exact match is necessary in a SELECT statement.

    • B.

      An exact match is not possible in a SELECT statement.

    • C.

      An exact match is necessary in a CREATE statement.

    • D.

      An exact match is not possible in a CREATE statement.

    Correct Answer
    B. An exact match is not possible in a SELECT statement.
    Explanation
    The wildcard in a WHERE clause is useful when an exact match is not possible in a SELECT statement. The wildcard, represented by the "%" symbol in SQL, allows for pattern matching and searching for partial matches or unknown values in a column. It can be used with the LIKE operator to find records that match a specific pattern or contain a certain substring. This is especially helpful when searching for records that have similar characteristics but may not have an exact match in the database.

    Rate this question:

  • 11. 

    Which command is used to insert a new records in the table?

    • A.

      ADD

    • B.

      INSERT INTO

    • C.

      INSERT

    • D.

      NEW

    Correct Answer
    B. INSERT INTO
    Explanation
    The correct answer is "INSERT INTO". This command is used to insert new records into a table in a database. It allows you to specify the table name and the values that should be inserted into the corresponding columns. By using the "INSERT INTO" command, you can add new data to your table and expand your database with additional records.

    Rate this question:

  • 12. 

    Which command is used to modify column name or table structure?

    • A.

      MODIFY

    • B.

      ADD

    • C.

      CHANGE

    • D.

      ALTER

    Correct Answer
    D. ALTER
    Explanation
    The ALTER command is used to modify the column name or table structure in a database. It allows for changes to be made to the existing structure of a table, such as adding or deleting columns, modifying column data types, or renaming columns. This command provides flexibility in altering the structure of a table without having to recreate it entirely.

    Rate this question:

  • 13. 

    Which command is used to change or update data in a table?

    • A.

      CHANGE

    • B.

      ALTER

    • C.

      UPDATE

    • D.

      MODIFY

    Correct Answer
    C. UPDATE
    Explanation
    The correct answer is UPDATE. The UPDATE command is used to modify or change data in a table. It allows you to update specific columns or rows in the table based on specified conditions. This command is commonly used in SQL to make changes to existing data in a database table.

    Rate this question:

  • 14. 

    Which keyword is used with UPDATE command to change the value?

    • A.

      CHANGE

    • B.

      MODIFY

    • C.

      ADD

    • D.

      SET

    Correct Answer
    D. SET
    Explanation
    The keyword used with the UPDATE command to change the value is SET. This keyword is followed by the column name and the new value that we want to update in the database table. Using the SET keyword allows us to specify exactly which column we want to update and what value we want to change it to.

    Rate this question:

  • 15. 

    Which keyword is used with ALTER command to delete a column?

    • A.

      DROP

    • B.

      DELETE

    • C.

      REMOVE

    • D.

      CHANGE

    Correct Answer
    A. DROP
    Explanation
    The keyword used with the ALTER command to delete a column is DROP. This keyword is used to remove a specific column from a table in a database. Using the DROP keyword allows for the deletion of the column and all associated data within it.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 04, 2017
    Quiz Created by
    Rushikesh
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.