SQL Quiz Exam: MCQ!

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 Juansegaliz
J
Juansegaliz
Community Contributor
Quizzes Created: 1 | Total Attempts: 1,738
Questions: 25 | Attempts: 1,743

SettingsSettingsSettings
SQL Quiz Exam: MCQ! - Quiz

.


Questions and Answers
  • 1. 

    ¿Qué significa SQL?

    • A.

      Structured Query Language

    • B.

      Strong Question Language

    • C.

      Structured Question Language

    Correct Answer
    A. Structured Query Language
    Explanation
    SQL stands for Structured Query Language. It is a programming language used to manage and manipulate relational databases. With SQL, users can create, modify, and retrieve data from databases. It is a standardized language that provides a set of commands and syntax for interacting with databases. SQL is widely used in the field of data management and is essential for working with databases in various applications and industries.

    Rate this question:

  • 2. 

    ¿Qué declaración SQL se utiliza para extraer datos de una base de datos?

    • A.

      SELECT

    • B.

      OPEN

    • C.

      EXTRACT

    • D.

      GET

    Correct Answer
    A. SELECT
    Explanation
    The correct answer is SELECT. In SQL, the SELECT statement is used to extract or retrieve data from a database. It allows you to specify the columns you want to retrieve and the table(s) from which you want to retrieve the data. It is one of the fundamental statements in SQL and is commonly used in querying and retrieving data from databases.

    Rate this question:

  • 3. 

    ¿Qué declaración SQL se utiliza para actualizar los datos en una base de datos?

    • A.

      UPDATE

    • B.

      SAVE

    • C.

      MODIFY

    • D.

      SAVE AS

    Correct Answer
    A. UPDATE
    Explanation
    The correct answer is UPDATE. The UPDATE statement is used in SQL to modify or update existing data in a database. It allows you to change the values of one or more columns in a table based on specified conditions. This statement is commonly used to make changes to data such as updating a specific record, changing values in multiple rows, or even updating data in multiple tables at once.

    Rate this question:

  • 4. 

    ¿Qué declaración SQL se utiliza para eliminar datos de una base de datos?

    • A.

      DELETE

    • B.

      COLLAPSE

    • C.

      REMOVE

    Correct Answer
    A. DELETE
    Explanation
    The correct answer is DELETE. In SQL, the DELETE statement is used to remove data from a database. It allows you to specify the table from which you want to delete data and can also include conditions to delete specific rows based on certain criteria. The DELETE statement is an essential part of data manipulation in SQL and is commonly used to remove unwanted or outdated data from a database.

    Rate this question:

  • 5. 

    ¿Qué declaración SQL se utiliza para insertar nuevos datos en una base de datos?

    • A.

      INSERT INTO

    • B.

      ADD NEW

    • C.

      ADD RECORD

    • D.

      INSERT NEW

    Correct Answer
    A. INSERT INTO
    Explanation
    The correct answer is "INSERT INTO". This statement is used in SQL to insert new data into a database. It is followed by the name of the table where the data will be inserted and then the values to be inserted. This statement allows for the addition of new records to a database table.

    Rate this question:

  • 6. 

    Con SQL, ¿cómo se selecciona una columna llamada "Nombre" de una tabla llamada "Personas"?

    • A.

      SELECT Nombre FROM Personas

    • B.

      SELECT Personas.Nombre

    • C.

      EXTRACT Nombre FROM Personas

    Correct Answer
    A. SELECT Nombre FROM Personas
    Explanation
    The correct answer is "SELECT Nombre FROM Personas". In SQL, to select a specific column from a table, you use the SELECT keyword followed by the name of the column you want to select, in this case "Nombre", and then specify the table name "Personas". This query will retrieve the values from the "Nombre" column of the "Personas" table.

    Rate this question:

  • 7. 

    Con SQL, ¿cómo se seleccionan todas las columnas de una tabla llamada "Personas"?

    • A.

      SELECT * FROM Personas

    • B.

      SELECT [all] FROM Persons

    • C.

      SELECT Persons

    • D.

      SELECT *.Persons

    Correct Answer
    A. SELECT * FROM Personas
    Explanation
    The correct answer is "SELECT * FROM Personas". This SQL statement selects all columns from the table "Personas". The asterisk (*) represents a wildcard that is used to select all columns in the table.

    Rate this question:

  • 8. 

    Con SQL, ¿cómo se seleccionan todos los registros de una tabla llamada "Personas" donde el valor de la columna "Nombre" es "Pedro"?

    • A.

      SELECT [all] FROM Personas WHERE Nombre='Peter'

    • B.

      SELECT [all] FROM Personas WHERE Nombre='Peter'

    • C.

      SELECT [all] FROM Personas WHERE Nombre LIKE 'Peter'

    • D.

      SELECT * FROM Personas WHERE Nombre=='Peter'

    Correct Answer
    A. SELECT [all] FROM Personas WHERE Nombre='Peter'
    Explanation
    The correct answer is "SELECT [all] FROM Personas WHERE Nombre='Peter'". This SQL statement is used to select all the records from the table "Personas" where the value of the column "Nombre" is "Peter". The keyword "SELECT" is used to specify the columns to be retrieved, "[all]" indicates that all columns will be selected, "FROM" specifies the table to select from, and "WHERE" is used to specify the condition for selecting the records. In this case, the condition is that the value of the column "Nombre" must be equal to "Peter".

    Rate this question:

  • 9. 

    Con SQL, ¿cómo se seleccionan todos los registros de una tabla llamada "Personas" en la que el valor de la columna "Nombre" comienza con una "a"?

    • A.

      SELECT * FROM Personas WHERE Nombre LIKE 'a%'

    • B.

      SELECT * FROM Personas WHERE Nombre='%a%'

    • C.

      SELECT * FROM Personas WHERE Nombre LIKE '%a'

    • D.

      SELECT * FROM Personas WHERE Nombre='a'

    Correct Answer
    A. SELECT * FROM Personas WHERE Nombre LIKE 'a%'
    Explanation
    The correct answer is "SELECT * FROM Personas WHERE Nombre LIKE 'a%'". This is because the "LIKE" keyword is used to search for a specified pattern in a column. In this case, we want to select all records from the "Personas" table where the value in the "Nombre" column starts with the letter "a". The "%" symbol is a wildcard that represents any number of characters, so "a%" will match any value that starts with "a".

    Rate this question:

  • 10. 

    El operador OR muestra un registro si CUALQUIER condición listada es verdadera. El operador AND muestra un registro si TODAS las condiciones enumeradas son verdaderas

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The explanation for the given correct answer is that the OR operator in programming displays a record if ANY of the listed conditions is true. On the other hand, the AND operator displays a record only if ALL of the listed conditions are true. Therefore, the statement is true.

    Rate this question:

  • 11. 

    Con SQL, ¿cómo se seleccionan todos los registros de una tabla llamada "Personas" donde el "Nombre" es "Peter" y el "Apellido" es "Jackson"?

    • A.

      SELECT * FROM Personas WHERE Nombre='Peter' AND Apellido='Jackson'

    • B.

      SELECT Nombre='Peter', Apellido='Jackson' FROM Personas

    • C.

      SELECT * FROM Personas WHERE Nombre<>'Peter' AND Apellido<>'Jackson'

    Correct Answer
    A. SELECT * FROM Personas WHERE Nombre='Peter' AND Apellido='Jackson'
    Explanation
    The correct answer is the first option: SELECT * FROM Personas WHERE Nombre='Peter' AND Apellido='Jackson'. This query uses the SELECT statement to retrieve all columns (*) from the table "Personas" where the "Nombre" column is equal to 'Peter' and the "Apellido" column is equal to 'Jackson'.

    Rate this question:

  • 12. 

    Con SQL, ¿cómo se seleccionan todos los registros de una tabla llamada "Personas" donde el "Apellido" está alfabéticamente entre (e incluyendo) "Hansen" y "Pettersen"?

    • A.

      SELECT * FROM Personas WHERE Apellido BETWEEN 'Hansen' AND 'Pettersen'  

    • B.

      SELECT * FROM Personas WHERE Apellido>'Hansen' AND Apellido<'Pettersen'

    • C.

      SELECT Apellido>'Hansen' AND Apellido<'Pettersen' FROM Personas

    Correct Answer
    A. SELECT * FROM Personas WHERE Apellido BETWEEN 'Hansen' AND 'Pettersen'  
    Explanation
    The correct answer is "SELECT * FROM Personas WHERE Apellido BETWEEN 'Hansen' AND 'Pettersen'". This query will select all the records from the "Personas" table where the "Apellido" (Last Name) is alphabetically between (including) "Hansen" and "Pettersen".

    Rate this question:

  • 13. 

    ¿Qué declaración SQL se utiliza para devolver sólo valores diferentes?

    • A.

      SELECT DISTINCT

    • B.

      SELECT UNIQUE

    • C.

      SELECT DIFFERENT

    Correct Answer
    A. SELECT DISTINCT
    Explanation
    The correct answer is "SELECT DISTINCT". This SQL statement is used to retrieve only unique values from a table or a result set. It eliminates duplicate rows and returns only distinct values.

    Rate this question:

  • 14. 

    ¿Qué palabra clave SQL se utiliza para ordenar el conjunto de resultados?

    • A.

      ORDER BY

    • B.

      SORT BY

    • C.

      ORDER

    • D.

      SORT

    Correct Answer
    A. ORDER BY
    Explanation
    The correct answer is "ORDER BY." In SQL, the "ORDER BY" keyword is used to sort the result set in ascending or descending order based on one or more columns. It allows the user to specify the column(s) to sort by and the sorting direction (ascending or descending). The other options, "SORT BY," "ORDER," and "SORT," are not valid keywords in SQL for sorting the result set.

    Rate this question:

  • 15. 

    Con SQL, ¿cómo se pueden devolver todos los registros de una tabla llamada "Personas" ordenados de forma descendente por "Nombre"?

    • A.

      SELECT * FROM Personas ORDER BY Nombre DESC

    • B.

      SELECT * FROM Personas SORT 'Nombre' DESC

    • C.

      SELECT * FROM Personas SORT BY 'Nombre' DESC

    • D.

      SELECT * FROM Personas ORDER Nombre DESC

    Correct Answer
    A. SELECT * FROM Personas ORDER BY Nombre DESC
    Explanation
    The correct answer is "SELECT * FROM Personas ORDER BY Nombre DESC". This query selects all records from the "Personas" table and orders them in descending order based on the "Nombre" column.

    Rate this question:

  • 16. 

    Con SQL, ¿cómo se puede insertar un nuevo registro en la tabla de "Personas"?

    • A.

      INSERT INTO Personas VALUES ('Jimmy', 'Jackson')  

    • B.

      INSERT ('Jimmy', 'Jackson') INTO Personas

    • C.

      INSERT VALUES ('Jimmy', 'Jackson') INTO Personas

    Correct Answer
    A. INSERT INTO Personas VALUES ('Jimmy', 'Jackson')  
    Explanation
    The correct answer is "INSERT INTO Personas VALUES ('Jimmy', 'Jackson')". This is the correct syntax for inserting a new record into the "Personas" table in SQL. The INSERT statement is used to add new data into a table, and the VALUES keyword is used to specify the values for each column in the table. In this case, the values 'Jimmy' and 'Jackson' are being inserted into the "Personas" table. The other options provided in the question are not valid SQL syntax for inserting a new record.

    Rate this question:

  • 17. 

    Con SQL, ¿cómo se puede insertar "Olsen" como "Apellido" en la tabla de "Personas"?

    • A.

      INSERT INTO Personas (Apellido) VALUES ('Olsen')  

    • B.

      INSERT ('Olsen') INTO Personas (Apellido)

    • C.

      INSERT INTO Personas ('Olsen') INTO Apellido

    Correct Answer
    A. INSERT INTO Personas (Apellido) VALUES ('Olsen')  
    Explanation
    The correct answer is INSERT INTO Personas (Apellido) VALUES ('Olsen'). This is the correct syntax for inserting the value "Olsen" into the "Apellido" column of the "Personas" table using SQL.

    Rate this question:

  • 18. 

    ¿Cómo puedes cambiar "Hansen" por "Nilsen" en la columna de "Apellidos" en la tabla de Personas?

    • A.

      UPDATE Personas SET Apellido='Nilsen' WHERE Apellido='Hansen' 

    • B.

      UPDATE Personas SET Apellido='Hansen' INTO Apellido='Nilsen'

    • C.

      MODIFY Personas SET Apellido='Nilsen' WHERE Apellido='Hansen'

    • D.

      MODIFY Personas SET Apellido='Hansen' INTO Apellido='Nilsen

    Correct Answer
    A. UPDATE Personas SET Apellido='Nilsen' WHERE Apellido='Hansen' 
    Explanation
    The correct answer is "UPDATE Personas SET Apellido='Nilsen' WHERE Apellido='Hansen'". This is the correct SQL statement to update the value in the "Apellido" column from "Hansen" to "Nilsen" in the "Personas" table. The UPDATE command is used to modify existing records in a table, and the WHERE clause specifies the condition that must be met for the update to occur. In this case, it specifies that the value in the "Apellido" column must be "Hansen" for the update to take place.

    Rate this question:

  • 19. 

    Con SQL, ¿cómo se pueden borrar los registros donde el "Nombre" es "Peter" en la Tabla de Personas?

    • A.

      DELETE FROM Personas WHERE Nombre = 'Peter'

    • B.

      DELETE ROW Nombre='Peter' FROM Personas

    • C.

      DELETE Nombre='Peter' FROM Personas

    Correct Answer
    A. DELETE FROM Personas WHERE Nombre = 'Peter'
    Explanation
    The correct answer is "DELETE FROM Personas WHERE Nombre = 'Peter'". This is the correct SQL syntax for deleting records from the "Personas" table where the "Nombre" column is equal to "Peter". The other options provided do not follow the correct syntax for deleting records in SQL.

    Rate this question:

  • 20. 

    Con SQL, ¿cómo se puede devolver el número de registros en la tabla de "Personas"?

    • A.

      SELECT COUNT(*) FROM Personas

    • B.

      SELECT NO(*) FROM Personas

    • C.

      SELECT LEN(*) FROM Personas

    • D.

      SELECT COLUMNS(*) FROM Personas

    Correct Answer
    A. SELECT COUNT(*) FROM Personas
    Explanation
    The correct answer is SELECT COUNT(*) FROM Personas. This query uses the COUNT function in SQL to return the number of records in the "Personas" table. The asterisk (*) is used as a wildcard to count all the rows in the table. The other options provided in the question are not valid SQL syntax for counting the number of records in a table.

    Rate this question:

  • 21. 

    ¿Cuál es el tipo de unión más común?

    • A.

      INNER JOIN

    • B.

      JOINED

    • C.

      INSIDE JOIN

    • D.

      JOINED TABLE

    Correct Answer
    A. INNER JOIN
    Explanation
    The correct answer is INNER JOIN. An INNER JOIN is the most common type of join in a database query. It combines rows from two or more tables based on a related column between them, only including the rows that have matching values in both tables. This type of join is commonly used to retrieve data that exists in both tables, allowing for the combination of information from different tables into a single result set.

    Rate this question:

  • 22. 

    ¿Qué operador se utiliza para seleccionar los valores dentro de un rango?

    • A.

      BETWEEN

    • B.

      WITHIN

    • C.

      RANGE

    • D.

      > <

    Correct Answer
    A. BETWEEN
    Explanation
    The operator used to select values within a range is BETWEEN. This operator is commonly used in SQL queries to specify a range of values for a particular condition. It allows for inclusive selection of values within the specified range.

    Rate this question:

  • 23. 

    La restricción NO NULL hace que una columna no acepte valores NULL.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The statement is true because the "NO NULL" constraint in a database table ensures that a column cannot have NULL values. This means that when inserting or updating data, the column must always have a valid value and cannot be left empty or undefined. By setting this constraint, it enforces data integrity and helps to prevent any inconsistencies or errors in the database.

    Rate this question:

  • 24. 

    ¿Qué operador se utiliza para buscar un patrón específico en una columna?

    • A.

      LIKE

    • B.

      FROM

    • C.

      GET

    • D.

      EQUALS

    Correct Answer
    A. LIKE
    Explanation
    The operator "LIKE" is used to search for a specific pattern in a column. It allows the user to use wildcards such as "%" to represent any number of characters or "_" to represent a single character. This operator is commonly used in SQL queries to retrieve data that matches a certain pattern, making it a suitable choice for searching for specific patterns in a column.

    Rate this question:

  • 25. 

    ¿Qué declaración SQL se utiliza para crear una tabla en una base de datos?

    • A.

      CREATE TABLE

    • B.

      CREATE DB

    • C.

      CREATE DATABASE TAB

    • D.

      CREATE DATABASE TABLE

    Correct Answer
    A. CREATE TABLE
    Explanation
    The correct answer is "CREATE TABLE". This SQL statement is used to create a new table in a database. It specifies the name of the table and the columns it will contain, along with their data types and any constraints.

    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
  • Feb 17, 2020
    Quiz Created by
    Juansegaliz

Related Topics

Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.