The Ultimate Server Query Language Quiz

42 Questions | Total Attempts: 5924

SettingsSettingsSettings
Please wait...
The Ultimate Server Query Language Quiz

A server query language is designed so that users can retrieve specific information from a database. As a software developer you should have some knowledge on the use of such languages. Do you believe you understand SQL completely? Take up the quiz below and be sure about it! All the best and look out for more tests on the topic.


Related Topics
Questions and Answers
  • 1. 
    Which SQL function is used to count the number of rows in a SQL query?
    • A. 

      COUNT()

    • B. 

      NUMBER()

    • C. 

      SUM()

  • 2. 
    The FROM SQL clause is used to…
    • A. 

      specify range for search condition

    • B. 

      Specify search condition

    • C. 

      Specify what table we are selecting or deleting data from.

  • 3. 
    Which of the following is NOT a SQL keyword or SQL clause?
    • A. 

      INSERT

    • B. 

      SELECT

    • C. 

      UPDATE

    • D. 

      INVERT

  • 4. 
    • A. 

      The SELECT clause only

    • B. 

      The DELETE and UPDATE clauses

    • C. 

      The UPDATE clause only

    • D. 

      None of the other three

  • 5. 
    What does DML stand for?
    • A. 

      Different Mode Level

    • B. 

      Data Model Language

    • C. 

      Data Mode Lane

    • D. 

      Data Manipulation language

  • 6. 
    Which SQL keyword is used to retrieve a maximum value?
    • A. 

      MOST

    • B. 

      MAX

    • C. 

      TOP

    • D. 

      UPPER

  • 7. 
    • A. 

      INSERT INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project')

    • B. 

      SAVE INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project')

    • C. 

      INSERT Projects VALUES ('Content Development', 'Website content development project')

    • D. 

      INSERT Projects ('Content Development', 'Website content development project')

  • 8. 
    Which of the following SQL clauses is used to enter data into a SQL table?
    • A. 

      INSERT INTO

    • B. 

      WRITE

    • C. 

      SELECT

    • D. 

      ENTER

  • 9. 
    Which of the following SQL clauses is used to DELETE data from a database table?
    • A. 

      DELETE

    • B. 

      REMOVE

    • C. 

      DROP DATA

    • D. 

      CLEAR

  • 10. 
    Which of the following SQL statements is correct?
    • A. 

      SELECT CustomerName, COUNT(CustomerName) FROM Orders

    • B. 

      SELECT CustomerName, COUNT(CustomerName) FROM Orders GROUP BY CustomerName

    • C. 

      SELECT CustomerName, COUNT(CustomerName) FROM Orders ORDER BY CustomerName

  • 11. 
    What does SQL stand for?
    • A. 

      Strong Question Language

    • B. 

      Structured Query Language

    • C. 

      Structured Question Language

  • 12. 
    Which SQL statement is used to extract data from a database?
    • A. 

      SELECT

    • B. 

      GET

    • C. 

      OPEN

    • D. 

      EXTRACT

  • 13. 
    Which SQL statement is used to update data in a database?
    • A. 

      SAVE

    • B. 

      SAVE AS

    • C. 

      MODIFY

    • D. 

      UPDATE

  • 14. 
    • A. 

      SELECT Persons.FirstName

    • B. 

      SELECT FirstName FROM Persons

    • C. 

      EXTRACT FirstName FROM Persons

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

      SELECT *.Persons

    • B. 

      SELECT [all] FROM Persons

    • C. 

      SELECT * FROM Persons

    • D. 

      SELECT Persons

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

      SELECT * FROM Persons WHERE FirstName'Peter'

    • B. 

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

    • C. 

      SELECT * FROM Persons WHERE FirstName='Peter'

    • D. 

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

  • 17. 
    • A. 

      SELECT * FROM Persons WHERE FirstName='a'

    • B. 

      SELECT * FROM Persons WHERE FirstName LIKE 'a%'

    • C. 

      SELECT * FROM Persons WHERE FirstName LIKE '%a'

    • D. 

      SELECT * FROM Persons WHERE FirstName='%a%'

  • 18. 
    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
    • A. 

      False

    • B. 

      True

  • 19. 
    With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?
    • A. 

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

    • B. 

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

    • C. 

      SELECT * FROM Persons WHERE FirstName'Peter' AND LastName'Jackson'

  • 20. 
    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"?
    • A. 

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

    • B. 

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

    • C. 

      SELECT LastName>'Hansen' AND LastName

  • 21. 
    Which SQL statement is used to return only different values?
    • A. 

      SELECT DISTINCT

    • B. 

      SELECT DIFFERENT

    • C. 

      SELECT UNIQUE

  • 22. 
    Which SQL keyword is used to sort the result-set?
    • A. 

      ORDER BY

    • B. 

      SORT

    • C. 

      ORDER

    • D. 

      SORT BY

  • 23. 
    • A. 

      SELECT * FROM Persons SORT BY 'FirstName' DESC

    • B. 

      SELECT * FROM Persons ORDER FirstName DESC

    • C. 

      SELECT * FROM Persons SORT 'FirstName' DESC

    • D. 

      SELECT * FROM Persons ORDER BY FirstName DESC

  • 24. 
    With SQL, how can you insert a new record into the "Persons" table?
    • A. 

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

    • B. 

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

    • C. 

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

  • 25. 
    How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?
    • A. 

      UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'

    • B. 

      MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'

    • C. 

      MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen

    • D. 

      UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'