Modern Database Systems SQL Quiz

30 Questions | Total Attempts: 1577

SettingsSettingsSettings
Please wait...
SQL Quizzes & Trivia

This Quiz is all about testing the basics skills in SQL. It covers SQL Server architecture, tools, security and datatypes, Implementing data integrity, subqueries, joins and T-SQL Enhancements.


Questions and Answers
  • 1. 
    The primary - foreign key relations are used to
    • A. 

      Cross-reference database tables

    • B. 

      To index the database.

    • C. 

      Clean-up the database

  • 2. 
    The UNION SQL clause can be used with
    • A. 

      The DELETE and UPDATE clauses

    • B. 

      The SELECT clause only

    • C. 

      The UPDATE clause only

  • 3. 
    Can you join a table to itself?
    • A. 

      YES

    • B. 

      NO

  • 4. 
    What is the difference between the WHERE and HAVING SQL clauses?
    • A. 

      The WHERE SQL clause condition(s) is applied to all rows in the result set before the HAVING clause is applied (if present). The HAVING clause is used only with SELECT SQL statements and specifies a search condition for an aggregate or a group.

    • B. 

      The HAVING SQL clause condition(s) is applied to all rows in the result set before the WHERE clause is applied (if present). The WHERE clause is used only with SELECT SQL statements and specifies a search condition for an aggregate or a group

    • C. 

      The Having clause is identical with the where clause

  • 5. 
    The difference between the DELETE and TRUNCATE SQL clauses is _________________
    • A. 

      The TRUNCATE clause is identical to the DELETE clause

    • B. 

      The DELETE clause deletes all rows in a database table, while the TRUNCATE clause can have a WHERE condition and might or might not delete all rows in a table.

    • C. 

      The TRUNCATE clause deletes all rows in a database table, while the DELETE clause can have a WHERE condition and might or might not delete all rows in a table

  • 6. 
    What is the ABS SQL function used for?  
    • A. 

      To return the minimum value of a numeric expression.

    • B. 

      To return the maximum value of a numeric expression

    • C. 

      To return the absolute, positive value of a numeric expression.

    • D. 

      To return the average value of a numeric expression.

  • 7. 
    SSIS stands for
    • A. 

      SQL Integration Services

    • B. 

      SQL Integrity Services

    • C. 

      SQL Information Services

  • 8. 
    SQL server Management Studio replaces
    • A. 

      Enterprise Manager

    • B. 

      Query Analyzer

    • C. 

      Both Enterprise Manager and Query Analyzer

    • D. 

      None

  • 9. 
    ------------------------------ is used to browse servers and view Log files
    • A. 

      Template Explorer

    • B. 

      SQL server Profiler

    • C. 

      Object Explorer

  • 10. 
    The command prompt utility used to copy data between SQL Server and User File is_____________
    • A. 

      Bcputility

    • B. 

      Dtautility

    • C. 

      Osqlutility

    • D. 

      Sqlcmdutility

  • 11. 
    The Master database in sql holds ------------------------ for SQL Server
    • A. 

      Temporary objects

    • B. 

      Templates

    • C. 

      Initialization Info

  • 12. 
    The Integrity which makes sure that keyvalues are consistent across tables
    • A. 

      Entity Integrity

    • B. 

      Domain Integrity

    • C. 

      Referential Integrity

    • D. 

      User Defined Integrity

  • 13. 
    Select  the Exact Numeric Datatypes in SQL( any 3)
    • A. 

      Smallmoney

    • B. 

      Image

    • C. 

      Tinyint

    • D. 

      Bigint

  • 14. 
    All Integrity Categories Support User-Defined Integrity
    • A. 

      True

    • B. 

      False

  • 15. 
    Primary Key Constraint Enforces ----------------------of the table
    • A. 

      Referential Integrity

    • B. 

      Entity Integrity

    • C. 

      Domain Integrity

  • 16. 
    A _______________constraint enforces referential Integrity
    • A. 

      Primary key

    • B. 

      Foreign key

    • C. 

      Unique key

    • D. 

      Check

  • 17. 
    Forign Key Constraint Does not create indexes Automatically
    • A. 

      True

    • B. 

      False

  • 18. 
    Single Column can have multiple Check Constraints
    • A. 

      True

    • B. 

      False

  • 19. 
    Only  ___________ null value(s) can appear in a column with unique statement constraint
    • A. 

      One

    • B. 

      Two

    • C. 

      Three

    • D. 

      Zero

  • 20. 
    A check Constraint cannot be placed on columns with text,ntext,___________ and ______________ datatypes
    • A. 

      Image

    • B. 

      Varbinary

    • C. 

      Rowversion

    • D. 

      Binary

  • 21. 
    DBCC  check constraint Returns any rows that violate rules.What does DBCC stands for?
    • A. 

      Data Consistency Checker

    • B. 

      Database Consistency Checker

    • C. 

      Default Consistency Checker

  • 22. 
    Default Constraint Enforces ____________________
    • A. 

      Domain Integrity

    • B. 

      Referential Integrity

    • C. 

      Entity Integrity

  • 23. 
    The SQL Server uses ___________ keyword to store the computed columns in a table
    • A. 

      SAVE_AS

    • B. 

      ROWVERSION

    • C. 

      PERSISTED

  • 24. 
    What is the purpose of the SQL AS Clause?
    • A. 

      The AS SQL clause is used change the name of a column in the result set or to assign a name to a derived column.

    • B. 

      The AS clause is used with the JOIN clause only.

    • C. 

      The AS clause defines a search condition.

  • 25. 
    The LIKE Keyword is used along with ______________
    • A. 

      GROUP BY clause.

    • B. 

      ORDER BY clause

    • C. 

      JOIN clause.

    • D. 

      WHERE clause.

Related Topics
Back to Top Back to top