Bluekey Technical Test Level 2

Approved & Edited by ProProfs Editorial Team
At ProProfs Quizzes, our dedicated in-house team of experts takes pride in their work. With a sharp eye for detail, they meticulously review each quiz. This ensures that every quiz, taken by over 100 million users, meets our standards of accuracy, clarity, and engagement.
Learn about Our Editorial Process
| Written by Shreyashah03
S
Shreyashah03
Community Contributor
Quizzes Created: 5 | Total Attempts: 2,491
Questions: 30 | Attempts: 147

SettingsSettingsSettings
Bluekey Technical Test Level 2 - Quiz

.


Questions and Answers
  • 1. 

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

    • A. 

      ADD

    • B. 

      INSERT

    • C. 

      CREATE

    • D. 

      MAKE

    Correct Answer
    C. CREATE
    Explanation
    In SQL, the CREATE statement is used to create new tables, views, or other database objects. It is not used to add rows to an existing table. To add rows to a table, the INSERT statement is used. Therefore, the correct answer is CREATE.

    Rate this question:

  • 2. 

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

    • A. 

      REMOVE FROM CUSTOMER ...

    • B. 

      DROP FROM CUSTOMER ...

    • C. 

      UPDATE FROM CUSTOMER ...

    • D. 

      DELETE FROM CUSTOMER WHERE ...

    Correct Answer
    D. 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 a specified condition. The "WHERE" clause allows for the selection of specific rows to be deleted, based on the given condition. This command is commonly used in SQL to delete data from a table while maintaining the structure of the table itself.

    Rate this question:

  • 3. 

    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 SQL WHERE clause is used to filter rows based on a specific condition. 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 row data that is returned from a query. This means that only the rows that satisfy the specified condition will be included in the result set, while the rows that do not meet the condition will be excluded. Therefore, the correct answer is that the WHERE clause limits the row data that is returned.

    Rate this question:

  • 4. 

    Which of the following is the original purpose of SQL?

    • A. 

      To specify the syntax and semantics of SQL data definition language

    • B. 

      To specify the syntax and semantics of SQL manipulation language

    • C. 

      To define the data structures

    • D. 

      All of the above.

    Correct Answer
    D. All of the above.
    Explanation
    The original purpose of SQL is to serve as a language that specifies the syntax and semantics of both the SQL data definition language and the SQL manipulation language. Additionally, SQL is used to define the data structures. Therefore, the correct answer is "All of the above."

    Rate this question:

  • 5. 

    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. This means that the wildcard can be used to search for partial matches or to retrieve all records that meet certain criteria without specifying the exact value. The wildcard, usually represented by the "%" symbol, allows for more flexible and versatile searches in the database.

    Rate this question:

  • 6. 

    A view is which of the following?

    • A. 

      A virtual table that can be accessed via SQL commands

    • B. 

      A virtual table that cannot be accessed via SQL commands

    • C. 

      A base table that can be accessed via SQL commands

    • D. 

      A base table that cannot be accessed via SQL commands

    Correct Answer
    A. A virtual table that can be accessed via SQL commands
    Explanation
    A view is a virtual table that can be accessed via SQL commands. Views are created based on queries and do not store any data themselves. They provide a way to simplify complex queries, hide sensitive information, and provide a customized view of the data to different users. Views can be used just like tables in SQL commands, allowing users to query and manipulate the data stored in the underlying tables without directly accessing them.

    Rate this question:

  • 7. 

    The command to eliminate a table from a database is:

    • A. 

      REMOVE TABLE CUSTOMER;

    • B. 

      DROP TABLE CUSTOMER;

    • C. 

      DELETE TABLE CUSTOMER;

    • D. 

      UPDATE TABLE CUSTOMER;

    Correct Answer
    B. DROP TABLE CUSTOMER;
    Explanation
    The correct answer is "DROP TABLE CUSTOMER;" because this command is used to remove a table from a database. The "REMOVE TABLE" and "DELETE TABLE" commands do not exist in SQL, and the "UPDATE TABLE" command is used to modify data within a table, not to eliminate the table itself.

    Rate this question:

  • 8. 

    ON UPDATE CASCADE ensures which of the following?

    • A. 

      Normalization

    • B. 

      Data Integrity

    • C. 

      Materialized Views

    • D. 

      All of the above.

    Correct Answer
    B. Data Integrity
    Explanation
    ON UPDATE CASCADE ensures data integrity. When a foreign key relationship is defined with ON UPDATE CASCADE, it means that if the primary key value of a referenced row is updated, the foreign key values in the referencing table will also be updated automatically to maintain referential integrity. This ensures that the data remains consistent and prevents any inconsistencies or errors that may occur if the foreign key values were not updated. Therefore, the correct answer is Data Integrity.

    Rate this question:

  • 9. 

    SQL data definition commands make up a(n) ________ .

    • A. 

      DDL

    • B. 

      DML

    • C. 

      HTML

    • D. 

      XML

    Correct Answer
    A. DDL
    Explanation
    SQL data definition commands are used to define and manage the structure of a database. These commands include creating, altering, and dropping database objects such as tables, views, indexes, and constraints. DDL stands for Data Definition Language, and it is a set of SQL commands that allow users to define and manipulate the structure of a database. Therefore, the correct answer is DDL.

    Rate this question:

  • 10. 

    Which of the following is valid SQL for an Index?

    • A. 

      CREATE INDEX ID;

    • B. 

      CHANGE INDEX ID;

    • C. 

      ADD INDEX ID;

    • D. 

      REMOVE INDEX ID;

    Correct Answer
    A. CREATE INDEX ID;
    Explanation
    The correct answer is "CREATE INDEX ID;". This SQL statement is used to create an index in a database table. Indexes are used to improve the performance of database queries by allowing faster retrieval of data. The "ID" in the statement represents the name of the index being created.

    Rate this question:

  • 11. 

    The SQL keyword(s) ________ is used with wildcards.

    • A. 

      LIKE only

    • B. 

      IN only

    • C. 

      NOT IN only

    • D. 

      IN and NOT IN

    Correct Answer
    A. LIKE only
    Explanation
    The SQL keyword "LIKE" is used with wildcards. It allows for pattern matching in SQL queries by using wildcards such as "%" (matches any sequence of characters) and "_" (matches any single character). This keyword is used to search for specific patterns within a column or string of data.

    Rate this question:

  • 12. 

    Which of the following is the correct order of keywords for SQL SELECT statements?

    • A. 

      SELECT, FROM, WHERE

    • B. 

      FROM, WHERE, SELECT

    • C. 

      WHERE, FROM,SELECT

    • D. 

      SELECT,WHERE,FROM

    Correct Answer
    A. SELECT, FROM, WHERE
    Explanation
    The correct order of keywords for SQL SELECT statements is SELECT, FROM, WHERE. This is because in a SELECT statement, you first specify the columns you want to retrieve using the SELECT keyword, then you specify the table or tables from which you want to retrieve the data using the FROM keyword, and finally you can specify conditions to filter the data using the WHERE keyword.

    Rate this question:

  • 13. 

     A subquery in an SQL SELECT statement is enclosed in:

    • A. 

      Braces -- {...}.

    • B. 

      CAPITAL LETTERS

    • C. 

      Parenthesis -- (...) .

    • D. 

      Brackets -- [...].

    Correct Answer
    C. Parenthesis -- (...) .
    Explanation
    A subquery in an SQL SELECT statement is enclosed in parenthesis -- (...) because it allows the subquery to be treated as a single unit and helps in defining the scope and order of execution. The use of parenthesis ensures that the subquery is evaluated first before the outer query is executed, allowing the subquery to provide the necessary data for the outer query's result set.

    Rate this question:

  • 14. 

    The result of a SQL SELECT statement is a(n) ________ .

    • A. 

      Report

    • B. 

      Form

    • C. 

      File

    • D. 

      Table

    Correct Answer
    D. Table
    Explanation
    The result of a SQL SELECT statement is a table. When a SELECT statement is executed, it retrieves data from one or more tables in a database and presents it in a tabular format. This result set is commonly referred to as a table, even though it may not necessarily correspond to a physical table in the database. The table-like structure allows for easy manipulation and analysis of the retrieved data using SQL queries.

    Rate this question:

  • 15. 

    Which of the following are the five built-in functions provided by SQL?

    • A. 

      COUNT, SUM, AVG, MAX, MIN

    • B. 

      SUM, AVG, MIN, MAX, MULT

    • C. 

      SUM, AVG, MULT, DIV, MIN

    • D. 

      SUM, AVG, MIN, MAX, NAME

    Correct Answer
    A. COUNT, SUM, AVG, MAX, MIN
    Explanation
    The correct answer is COUNT, SUM, AVG, MAX, MIN. These are the five built-in functions provided by SQL. COUNT is used to count the number of rows in a table. SUM is used to calculate the sum of a column. AVG is used to calculate the average value of a column. MAX is used to find the maximum value in a column. MIN is used to find the minimum value in a column. These functions are commonly used in SQL queries to perform calculations and retrieve specific data from a database.

    Rate this question:

  • 16. 

    In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk (*) means that:

    • A. 

      All columns of the table are to be returned.

    • B. 

      All records meeting the full criteria are to be returned.

    • C. 

      All records with even partial criteria met are to be returned.

    • D. 

      None of the above is correct.

    Correct Answer
    A. All columns of the table are to be returned.
    Explanation
    In an SQL SELECT statement, the asterisk (*) is used as a shorthand notation to represent all columns of the table. When the asterisk is used, it indicates that the query should return all columns from the specified table, without explicitly listing each column name. Therefore, the correct answer is that all columns of the table are to be returned.

    Rate this question:

  • 17. 

     The HAVING clause does which of the following?

    • A. 

      Acts like a WHERE clause but is used for groups rather than rows.

    • B. 

      Acts like a WHERE clause but is used for rows rather than columns.

    • C. 

      Acts like a WHERE clause but is used for columns rather than groups.

    • D. 

      Acts EXACTLY like a WHERE clause.

    Correct Answer
    A. Acts like a WHERE clause but is used for groups rather than rows.
    Explanation
    The HAVING clause is used to filter the results of a GROUP BY query based on a condition that applies to groups rather than individual rows. It is similar to the WHERE clause, which filters rows based on a condition, but the HAVING clause operates on groups of rows. Therefore, the correct answer is that the HAVING clause acts like a WHERE clause but is used for groups rather than rows.

    Rate this question:

  • 18. 

    The SQL -92 wildcards are ____ and ____ .

    • A. 

      Asterisk (*); percent sign (%)

    • B. 

      Percent sign (%); underscore (_)

    • C. 

      Underscore(_); question mark (?)

    • D. 

      Question mark (?); asterisk (*)

    Correct Answer
    B. Percent sign (%); underscore (_)
    Explanation
    The SQL -92 wildcards are the percent sign (%) and the underscore (_). The percent sign represents any sequence of characters, while the underscore represents any single character. These wildcards are commonly used in SQL queries to perform pattern matching and retrieve data based on specific criteria.

    Rate this question:

  • 19. 

    To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.

    • A. 

      ONLY

    • B. 

      UNIQUE

    • C. 

      DISTINCT

    • D. 

      SINGLE

    Correct Answer
    C. DISTINCT
    Explanation
    To remove duplicate rows from the results of an SQL SELECT statement, the "DISTINCT" qualifier must be included. This qualifier ensures that only unique values are returned in the result set, eliminating any duplicate rows. By specifying "DISTINCT", the SELECT statement will only retrieve distinct or unique values from the specified columns, providing a clean and distinct set of results without any duplicates.

    Rate this question:

  • 20. 

    The benefits of a standard relational language include which of the following?

    • A. 

      Reduced training costs

    • B. 

      Increased dependence on a single vendor

    • C. 

      Applications are not needed.

    • D. 

      All of the above.

    Correct Answer
    A. Reduced training costs
    Explanation
    A standard relational language, such as SQL, allows for consistency and uniformity across different database management systems. This means that employees only need to be trained in one language, reducing training costs. It also enables organizations to easily switch between vendors without having to retrain employees, thus reducing dependence on a single vendor. However, the statement "Applications are not needed" is not a benefit of a standard relational language, as applications are still required to interact with and manipulate the data in the database.

    Rate this question:

  • 21. 

    Which of the following do you need to consider when you make a table in SQL?

    • A. 

      Data types

    • B. 

      Primary keys

    • C. 

      Default values

    • D. 

      All of the above.

    Correct Answer
    D. All of the above.
    Explanation
    When creating a table in SQL, there are several factors that need to be considered. Firstly, data types need to be specified for each column in the table, indicating the type of data that will be stored in that column. Secondly, primary keys need to be defined to uniquely identify each row in the table. This ensures data integrity and efficient querying. Lastly, default values can be set for certain columns, which will be used if no other value is provided during insertion. Considering all of these factors is important to design a well-structured and functional table in SQL.

    Rate this question:

  • 22. 

    SQL query and modification commands make up a(n) ________ .

    • A. 

      DDL

    • B. 

      DML

    • C. 

      HTML

    • D. 

      XML

    Correct Answer
    B. DML
    Explanation
    SQL query and modification commands are used to manipulate data in a database. DML (Data Manipulation Language) is a subset of SQL that includes commands like INSERT, UPDATE, DELETE, and SELECT. DDL (Data Definition Language) is used to define and modify the structure of the database, while HTML and XML are markup languages used for creating web pages and storing data respectively. Therefore, the correct answer is DML.

    Rate this question:

  • 23. 

    When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s):

    • A. 

      LIKE only.

    • B. 

      IN only.

    • C. 

      NOT IN only

    • D. 

      Both IN and NOT IN

    Correct Answer
    D. Both IN and NOT IN
    Explanation
    When three or more AND and OR conditions are combined, it is easier to use both the IN and NOT IN SQL keywords. These keywords allow us to specify multiple values for a column in a single condition. The IN keyword is used to check if a value matches any of the specified values, while the NOT IN keyword is used to check if a value does not match any of the specified values. By using both keywords, we can easily combine multiple conditions and check for a variety of values in a concise and efficient manner.

    Rate this question:

  • 24. 

    The Microsoft Access wildcards are ____ and ____ .

    • A. 

      Asterisk (*); percent sign (%)

    • B. 

      Percent sign (%); underscore (_)

    • C. 

      Underscore(_); question mark (?)

    • D. 

      Question mark (?); asterisk (*)

    Correct Answer
    D. Question mark (?); asterisk (*)
    Explanation
    The Microsoft Access wildcards are the question mark (?) and the asterisk (*). The question mark represents a single character, while the asterisk represents any number of characters. These wildcards are commonly used in queries and searches to match patterns and retrieve specific data from a database.

    Rate this question:

  • 25. 

    Find the SQL statement below that is equal to the following: SELECT NAME FROM CUSTOMER WHERE STATE = 'VA';

    • A. 

      SELECT NAME IN CUSTOMER WHERE STATE IN ('VA');

    • B. 

      SELECT NAME IN CUSTOMER WHERE STATE = 'VA';

    • C. 

      SELECT NAME IN CUSTOMER WHERE STATE = 'V';

    • D. 

      SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');

    Correct Answer
    D. SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');
    Explanation
    The correct answer is "SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');". This statement selects the "NAME" column from the "CUSTOMER" table where the "STATE" column is equal to 'VA'. The "IN" keyword is used to specify multiple values for the "STATE" column, in this case, only 'VA' is specified.

    Rate this question:

  • 26. 

    Which one of the following sorts rows in SQL?

    • A. 

      SORT BY

    • B. 

      ALIGN BY

    • C. 

      ORDER BY

    • D. 

      GROUP BY

    Correct Answer
    C. ORDER BY
    Explanation
    ORDER BY is used in SQL to sort rows in a specified order. It allows the user to arrange the result set in ascending or descending order based on one or more columns. This is particularly useful when retrieving data from a table and wanting it to be displayed in a specific order, such as alphabetically or numerically. The other options, SORT BY, ALIGN BY, and GROUP BY, are not valid SQL sorting clauses.

    Rate this question:

  • 27. 

    To define what columns should be displayed in an SQL SELECT statement:

    • A. 

      Use FROM to name the source table(s) and list the columns to be shown after SELECT.

    • B. 

      Use USING to name the source table(s) and list the columns to be shown after SELECT.

    • C. 

      Use SELECT to name the source table(s) and list the columns to be shown after USING.

    • D. 

      Use USING to name the source table(s) and list the columns to be shown after WHERE.

    Correct Answer
    A. Use FROM to name the source table(s) and list the columns to be shown after SELECT.
    Explanation
    The correct answer is "use FROM to name the source table(s) and list the columns to be shown after SELECT." This is because in an SQL SELECT statement, the FROM clause is used to specify the table(s) from which the data is retrieved, and the columns to be displayed are listed after the SELECT keyword.

    Rate this question:

  • 28. 

    The SQL keyword BETWEEN is used:

    • A. 

      For ranges.

    • B. 

      To limit the columns displayed.

    • C. 

      As a wildcard.

    • D. 

      None of the above is correct.

    Correct Answer
    A. For ranges.
    Explanation
    The SQL keyword BETWEEN is used for ranges. It allows us to specify a range of values to be included in a query. This is commonly used in conjunction with the WHERE clause to filter data within a specific range. For example, we can use the BETWEEN keyword to retrieve all records where a certain column value falls within a specified range of values.

    Rate this question:

  • 29. 

    A subquery in an SQL SELECT statement:

    • A. 

      Can only be used with two tables.

    • B. 

      Can always be duplicated by a join.

    • C. 

      Has a distinct form that cannot be duplicated by a join.

    • D. 

      Cannot have its results sorted using ORDER BY.

    Correct Answer
    C. Has a distinct form that cannot be duplicated by a join.
    Explanation
    A subquery in an SQL SELECT statement has a distinct form that cannot be duplicated by a join. This means that the logic and structure of a subquery cannot be replicated using a join operation. Subqueries allow for more complex and specific queries by nesting one query within another. They can be used to retrieve data from multiple tables, apply conditions, and perform calculations. While joins can also retrieve data from multiple tables, they do not have the same level of flexibility and complexity as subqueries. Therefore, the statement that a subquery has a distinct form that cannot be duplicated by a join is correct.

    Rate this question:

  • 30. 

    SQL is:

    • A. 

      A programming language.

    • B. 

      An operating system.

    • C. 

      A data sublanguage.

    • D. 

      A DBMS

    Correct Answer
    C. A data sublanguage.
    Explanation
    SQL stands for Structured Query Language, which is a specialized programming language used for managing and manipulating relational databases. It is not an operating system or a DBMS (Database Management System) itself, but rather a language that is used within these systems to interact with the data stored in them. SQL allows users to create, modify, and retrieve data from databases, as well as perform various operations such as filtering, sorting, and aggregating data. Therefore, it is considered a data sublanguage, specifically designed for working with databases.

    Rate this question:

Back to Top Back to top