Alien head

Basic SQL Quiz

Description: Basic SQL Quiz
Number of Questions: 18
Created by:
Tags: sql
Attempted 0/18 Correct 0 Score 0

What does SQL stand for?

sql
  1. Strong Question Language

  2. Structured Question Language

  3. Structured Query Language


Correct Option: C

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

sql
  1. GET

  2. OPEN

  3. EXTRACT

  4. SELECT

  5. QUERY


Correct Option: D

Which SQL statement is used to update data in a database?

sql
  1. UPDATE

  2. SAVE AS

  3. MODIFY

  4. SAVE


Correct Option: A

Which SQL statement is used to delete data from a database?

sql
  1. TRUNCATE

  2. DELETE

  3. REMOVE


Correct Option: B

Which SQL statement is used to insert new data in a database?

sql
  1. ADD RECORD

  2. ADD INTO

  3. INSERT

  4. ADD NEW


Correct Option: C

With SQL, how do you select a column named "FirstName" from a table named "Persons"?

sql
  1. EXTRACT FirstName FROM Persons

  2. SELECT FirstName FROM Persons

  3. SELECT Persons.FirstName


Correct Option: B

With SQL, how do you select all the columns from a table named "Persons"?

sql
  1. SELECT [all] FROM Persons

  2. SELECT All Persons

  3. SELECT *.Persons

  4. SELECT * FROM Persons


Correct Option: D

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

sql
  1. SELECT [all] FROM Persons WHERE FirstName='Peter'

  2. SELECT * FROM Persons WHERE FirstName LIKE 'Peter'

  3. SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'

  4. SELECT * FROM Persons WHERE FirstName='Peter'


Correct Option: D

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

sql
  1. SELECT * FROM Persons WHERE FirstName='%a%'

  2. SELECT * FROM Persons WHERE FirstName LIKE '%a'

  3. SELECT * FROM Persons WHERE FirstName='a'

  4. SELECT * FROM Persons WHERE FirstName LIKE 'a%'

  5. SELECT * FROM Persons WHERE FirstName='a'"


Correct Option: D

The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true

sql
  1. True

  2. False


Correct Option: A

Given an employees table as follows: empid name managerid a1 bob NULL b1 jim a1 B2 tom a1 What value will select count(*) from employees return?

sql
  1. 1

  2. 2

  3. 3

  4. none of the above


Correct Option: C

The result of a SELECT statement can contain duplicate rows.

sql
  1. True

  2. False


Correct Option: A

Sometimes the expression "select count(*)" will return fewer rows than the expression "select count(value)".

sql
  1. True

  2. False


Correct Option: B

What type of lock will deny users any access to a table?

sql
  1. EXPLICIT

  2. IMPLICIT

  3. EXCLUSIVE

  4. SHARED

  5. READ ONLY


Correct Option: C

Which of the following is the correct SQL statement to use to remove rows from a table?

sql
  1. DROP

  2. REMOVE ROW

  3. DELETE

  4. DELETE ROW


Correct Option: C

The only way to join two tables is by using standard, ANSI syntax.

sql
  1. True

  2. False


Correct Option: B

A NULL value is treated as a blank or 0.

sql
  1. True

  2. False


Correct Option: B

The left outer join is one type of outer join. Another one is the.

sql
  1. right

  2. full

  3. right outer

  4. full outer

  5. all of the above


Correct Option: E
+ View questions