0

databases Online Quiz - 213

Description: databases Online Quiz - 213
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. GetSystemDate()

  2. GetDate()

  3. GetCurrentDateTime()

  4. None


Correct Option: B

What will be the Output for the Below Query Select * from Retailer where rtrid = (select top 3 Rtrid from retailer)

  1. Return Top 3 Row in the Retailer Table

  2. Return Error

  3. Return No Record

  4. Return all Records from Retailer Table


Correct Option: B
  1. GetSystemDate()

  2. GetDate()

  3. GetCurrentDateTime()

  4. None


Correct Option: B
  1. Return Top 3 Row in the Retailer Table

  2. Return Error

  3. Return No Record

  4. Return all Records from Retailer Table


Correct Option: B
  1. Abs is not a recognized function name

  2. -20

  3. 20

  4. None


Correct Option: C

Which of the joins are available in SQL i) Inner Join ii) Left Outer Join iii) Cross Join iv) Self Join

  1. All the Above

  2. i) and ii)

  3. i), ii) and iii)

  4. None


Correct Option: A
  1. One

  2. More than One

  3. None

  4. Stored Procedure Does not support Output Parameter


Correct Option: B

A User Defined Function can Return

  1. One Value

  2. More than One Value

  3. No Value

  4. User Defined Function will not return Value


Correct Option: B
  1. Stored Procedure

  2. Function

  3. Table

  4. View


Correct Option: C

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

  1. Open

  2. Get

  3. Extract

  4. None of the Above


Correct Option: C
  1. 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"?
  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: D
  1. With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?
  1. SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'

  2. SELECT FirstName='Peter', LastName='Jackson' FROM Persons

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

  4. None


Correct Option: C
  1. With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?
  1. SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName

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

  3. SELECT LastName>'Hansen' AND LastName

  4. None


Correct Option: B
  1. Which SQL keyword is used to sort the result-set? SORT BY ORDER BY SORT ORDER
  1. SORT BY

  2. ORDER BY

  3. SORT

  4. ORDER


Correct Option: B
  1. With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
  1. SELECT * FROM Persons SORT BY 'FirstName' DESC

  2. SELECT * FROM Persons SORT 'FirstName' DESC

  3. SELECT * FROM Persons ORDER BY FirstName DESC

  4. SELECT * FROM Persons ORDER FirstName DES


Correct Option: C
  1. With SQL, how can you insert a new record into the "Persons" table?
  1. INSERT VALUES ('Jimmy', 'Jackson') INTO Persons

  2. INSERT ('Jimmy', 'Jackson') INTO Persons

  3. INSERT INTO Persons VALUES ('Jimmy', 'Jackson')

  4. None


Correct Option: C
  1. With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?
  1. INSERT INTO Persons ('Olsen') INTO LastName

  2. INSERT ('Olsen') INTO Persons (LastName)

  3. INSERT INTO Persons (LastName) VALUES ('Olsen')

  4. None


Correct Option: C
  1. With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?
  1. DELETE ROW FirstName='Peter' FROM Persons

  2. DELETE FROM Persons WHERE FirstName = 'Peter'

  3. DELETE FirstName='Peter' FROM Persons

  4. None


Correct Option: B
- Hide questions