SQL Fundamentals

Comprehensive test of basic SQL and database concepts including operators, transactions, constraints, keys, views, and DDL/DML commands for database management and query operations.

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

OR operator returns TRUE when

  1. both the specified conditions are true
  2. any one of the specified conditions is true
  3. none of the specified conditions is true
  4. both (1) and (2)
Question 2 Multiple Choice (Single Answer)

All changes made by a transaction are undone by

  1. COMMIT
  2. DROP
  3. ROLLBACK
  4. SAVEPOINT
Question 3 Multiple Choice (Single Answer)

The constraints are

  1. rules to prevent invalid data entry
  2. rules to write programs in SQL
  3. rules to create user-defined data type in SQL
  4. none of these
Question 4 Multiple Choice (Single Answer)

A primary key made of more than one column (multi column) is called

  1. foreign key
  2. duplicate key
  3. alternate key
  4. composite key
Question 5 Multiple Choice (Single Answer)

A VIEW

  1. contains no data until a call for it is made
  2. is an object that is mapped to a SELECT sentence
  3. both (1) and (2)
  4. none of these
Question 6 Multiple Choice (Single Answer)

The constraint used to avoid keying in repeated values into a column must be declared_____________.

  1. UNIQUE
  2. DISTINCT
  3. CHECK
  4. None of these
Question 7 Multiple Choice (Single Answer)

A PRIMARY KEY must

  1. contain NULL VALUES
  2. contain repetitive values
  3. contain NULL as well as repetitive values
  4. none of these
Question 8 Multiple Choice (Single Answer)

Which of these is not the ADO Data Type?

  1. adBigInt
  2. adUID
  3. adCurrency
  4. adWChar
Question 9 Multiple Choice (Single Answer)

Which command is used to make back up copies of database tables?

  1. CREATE INTO
  2. SELECT INTO
  3. CREATE FROM
  4. NONE OF THESE
Question 10 Multiple Choice (Single Answer)

How to create a backup copy of table emp called emp_backup in another database called DBEmp_backup.mdb?

  1. CREATE TABLE DBEmp_backup.emp_backup FROM emp
  2. SELECT emp.* INTO emp_backup IN DBEmp_backup.mdb FROM emp
  3. CREATE TABLE emp_backup IN DBEmp_backup.mdb FROM emp
  4. None of these
Question 11 Multiple Choice (Single Answer)

The 'IN SQL' keyword

  1. is used with the DISTINCT SQL keyword only
  2. is used with the INSERT SQL keyword only
  3. determines if a value matches any of the values in a list or a sub-query
  4. defines the tables we are selecting or deleting data from
Question 12 Multiple Choice (Single Answer)

ADO stands for

  1. Active Database Objects
  2. Active Directory Object
  3. Advanced Data Object
  4. ActiveX Data Objects
Question 13 Multiple Choice (Single Answer)

The UPDATE SQL clause can

  1. update only one row at a time
  2. update more than one row at a time
  3. delete more than one row at a time
  4. delete only one row at a time
Question 14 Multiple Choice (Single Answer)

Which method will you use to most effectively achieve the objective?

  1. Disable the triggers while performing the import process.
  2. Drop the triggers before the import process, and then recreate them.
  3. Use appropriate arguments while performing the import process to disable the firing of triggers.
  4. Do nothing because the triggers will not be fired when you perform an import by using the bcp utility.
Question 15 Multiple Choice (Single Answer)

SQL is

  1. Structured Query Language
  2. Sequential Query Language
  3. Standard Query Language
  4. Simple Query Language
Question 16 Multiple Choice (Single Answer)

Which of the following is a DDL command?

  1. INSERT
  2. CREATE
  3. UPDATE
  4. COMMIT
Question 17 Multiple Choice (Single Answer)

INDEXES are created to

  1. locate records quickly
  2. locate a table quickly
  3. to create a back up table
  4. none of these
Question 18 Multiple Choice (Single Answer)

An empty column declared _________ stores.

  1. ZERO
  2. BLANK
  3. NULL
  4. NONE OF THESE
Question 19 Multiple Choice (Single Answer)

Which SQL command inserts new data into a database?

  1. NEW
  2. INSERT
  3. ADD
  4. NONE OF THESE
Question 20 Multiple Choice (Single Answer)

Which SQL command updates data in a database?

  1. MODIFY
  2. CHANGE
  3. UPDATE
  4. EDIT
Question 21 Multiple Choice (Single Answer)

Which SQL command deletes table from a database?

  1. DROP
  2. ERASE
  3. DELETE
  4. REMOVE
Question 22 Multiple Choice (Single Answer)

Which SQL command retrieves data from a database?

  1. GET
  2. EXTRACT
  3. SELECT
  4. VIEW
Question 23 Multiple Choice (Single Answer)

What is DDL?

  1. Data Dictionary Language
  2. Data Definition language
  3. Data Declaration Language
  4. None of these
Question 24 Multiple Choice (Single Answer)

COMMIT is a

  1. DDL command
  2. DML command
  3. DCL command
  4. None of these
Question 25 Multiple Choice (Single Answer)

AND operator returns TRUE when

  1. both the specified conditions are true
  2. any one of the specified conditions is true
  3. none of the specified conditions is true
  4. both (1) and (2)