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.
Questions
OR operator returns TRUE when
- both the specified conditions are true
- any one of the specified conditions is true
- none of the specified conditions is true
- both (1) and (2)
All changes made by a transaction are undone by
- COMMIT
- DROP
- ROLLBACK
- SAVEPOINT
The constraints are
- rules to prevent invalid data entry
- rules to write programs in SQL
- rules to create user-defined data type in SQL
- none of these
A primary key made of more than one column (multi column) is called
- foreign key
- duplicate key
- alternate key
- composite key
A VIEW
- contains no data until a call for it is made
- is an object that is mapped to a SELECT sentence
- both (1) and (2)
- none of these
The constraint used to avoid keying in repeated values into a column must be declared_____________.
- UNIQUE
- DISTINCT
- CHECK
- None of these
A PRIMARY KEY must
- contain NULL VALUES
- contain repetitive values
- contain NULL as well as repetitive values
- none of these
Which of these is not the ADO Data Type?
- adBigInt
- adUID
- adCurrency
- adWChar
Which command is used to make back up copies of database tables?
- CREATE INTO
- SELECT INTO
- CREATE FROM
- NONE OF THESE
How to create a backup copy of table emp called emp_backup in another database called DBEmp_backup.mdb?
- CREATE TABLE DBEmp_backup.emp_backup FROM emp
- SELECT emp.* INTO emp_backup IN DBEmp_backup.mdb FROM emp
- CREATE TABLE emp_backup IN DBEmp_backup.mdb FROM emp
- None of these
The 'IN SQL' keyword
- is used with the DISTINCT SQL keyword only
- is used with the INSERT SQL keyword only
- determines if a value matches any of the values in a list or a sub-query
- defines the tables we are selecting or deleting data from
ADO stands for
- Active Database Objects
- Active Directory Object
- Advanced Data Object
- ActiveX Data Objects
The UPDATE SQL clause can
- update only one row at a time
- update more than one row at a time
- delete more than one row at a time
- delete only one row at a time
Which method will you use to most effectively achieve the objective?
- Disable the triggers while performing the import process.
- Drop the triggers before the import process, and then recreate them.
- Use appropriate arguments while performing the import process to disable the firing of triggers.
- Do nothing because the triggers will not be fired when you perform an import by using the bcp utility.
SQL is
- Structured Query Language
- Sequential Query Language
- Standard Query Language
- Simple Query Language
Which of the following is a DDL command?
- INSERT
- CREATE
- UPDATE
- COMMIT
INDEXES are created to
- locate records quickly
- locate a table quickly
- to create a back up table
- none of these
An empty column declared _________ stores.
- ZERO
- BLANK
- NULL
- NONE OF THESE
Which SQL command inserts new data into a database?
- NEW
- INSERT
- ADD
- NONE OF THESE
Which SQL command updates data in a database?
- MODIFY
- CHANGE
- UPDATE
- EDIT
Which SQL command deletes table from a database?
- DROP
- ERASE
- DELETE
- REMOVE
Which SQL command retrieves data from a database?
- GET
- EXTRACT
- SELECT
- VIEW
What is DDL?
- Data Dictionary Language
- Data Definition language
- Data Declaration Language
- None of these
COMMIT is a
- DDL command
- DML command
- DCL command
- None of these
AND operator returns TRUE when
- both the specified conditions are true
- any one of the specified conditions is true
- none of the specified conditions is true
- both (1) and (2)