0

Identify the SQL Statements

Description: You will be asked a question for SQL statement, Choose appropriate answer from the options.
Number of Questions: 20
Created by:
Tags: databases sql
Attempted 0/20 Correct 0 Score 0
  1. DROP ANY INDEX

  2. DROP ALL INDEX

  3. REMOVE ANY INDEX

  4. REMOVE ALL INDEX


Correct Option: A

If a table is dropped, which of the following statement is true.

  1. indexes and sequences are automatically dropped, but views and constraints remain

  2. views and indexes are automatically dropped, but constraints and sequences remain

  3. indexes and constraints are automatically dropped, but views and sequences remain

  4. views and sequences are automatically dropped, but indexes and constraints remain


Correct Option: C

A function-based index is an index based on expressions

  1. True

  2. False


Correct Option: A

Which of the below statement is worth creating an index

  1. The table is small

  2. The columns are often used as a condition in the query

  3. Most queries are expected to retrieve more than 2 to 4 percent of the rows in the table

  4. The table is updated frequently


Correct Option: B
  1. Structured Question Language

  2. Strong Question Language

  3. Structured Query Language

  4. Structured Query Limited


Correct Option: C

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

  1. UPDATE

  2. MODIFY

  3. SAVE AS

  4. SAVE


Correct Option: A
  1. ADD NEW

  2. ADD RECORD

  3. INSERT NEW

  4. INSERT INTO


Correct Option: D
  1. SELECT Persons.FirstName

  2. EXTRACT FirstName FROM Persons

  3. SELECT FirstName FROM Persons

  4. SELECT FROM FirstName IN Persons


Correct Option: C
  1. SELECT *.Persons

  2. SELECT Persons

  3. SELECT * FROM Persons

  4. SELECT [all] FROM Persons


Correct Option: C

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

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

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

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

  4. SELECT * FROM Persons WHERE FirstName<>'Peter'


Correct Option: A
  1. SELECT * FROM Persons WHERE FirstName='%a%'

  2. SELECT * FROM Persons WHERE FirstName='a_'

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

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


Correct Option: C
  1. SELECT FirstName='Peter', LastName='Jackson' FROM Persons

  2. SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'

  3. SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'

  4. SELECT WHERE FirstName='Peter' AND LastName='Jackson' FROM Persons


Correct Option: B
  1. SELECT LastName>'Hansen' AND LastName

  2. SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName

  3. SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'

  4. SELECT * FROM Persons WHERE LastName IN 'Hansen' AND 'Pettersen'


Correct Option: C
  1. SELECT UNIQUE

  2. SELECT DISTINCT

  3. SELECT DIFFERENT

  4. SELECT SAME


Correct Option: B
  1. SELECT * FROM Persons ORDER FirstName DESC

  2. SELECT * FROM Persons SORT BY 'FirstName' DESC

  3. SELECT * FROM Persons ORDER BY FirstName DESC

  4. SELECT * FROM Persons SORT 'FirstName' DESC


Correct Option: C
- Hide questions