Q. Which of the following commands will change the name of the PROMOTION table to GIFT?
RENAME promotion TO gift;
Q. What is the procedure for assigning new names for the columns that are displayed by a view? A) The new column names can be listed after the VIEW keyword, enclosed in parentheses. B) Column aliases can be used in the subquery, and Oracle11g will use the aliases as column names in the view that is created. C) all of the above D) none of the above
C) all of the above
Q. If you define a column as an identity column,
a number is generated for that column whenever a row is added to the table
Q. SQL statements contain command words but do not contain data.
Q. An index is not implicitly created when which type of constraint is created?
Q. The SQL cache stores the end-user written SQL. a. True b. False ANSWER
Q. Which SQL keyword is used to search for records? a. FIND b. SEARCH c. SELECT d. UPDATE
Q. A relational database consists of one or more ___________.
Q. The ANSI SQL standards are also accepted by the ISO.
Q. One major advantage of the outer join is that:
information is not lost.
Q. The SQL injection statement ____ finds specific users. - whatever‘ OR full_name = ‘%Mia%‘ - whatever‘ OR full_name IS ‘%Mia%‘ - whatever‘ OR full_name LIKE ‘%Mia%‘ - whatever‘ OR full_name equals ‘%Mia%‘
whatever‘ OR full_name LIKE ‘%Mia%‘
Q. Which of the following is NOT a system database on a SQL Server system? A) model B) master C) directory D) resource
Q. Which SQL statement is used to update data in a database? MODIFY SAVE SAVE AS UPDATE
Q. With SQL, how do you select all the columns from a table named “Persons“?
Q. Which level of is reached by using primary keys on a table within a SQL Server database? a) 1NF b) 2NF c) 3NF d) 4NF
a) 1NF Section Reference: First Normal Form (1NF) - Eliminate Repeating Groups Explanation: After you define a primary key for the table, you have met the first normalized form criteria.
Q. Which of the following statements about the FOREIGN KEY constraint is incorrect? A. When the constraint exists, by default a record cannot be deleted from the parent table if matching entries exist in the child table. B. When the keywords ON DELETE CASCADE are included in the constraint definition, a corresponding child record will automatically be deleted when the parent record is deleted. C. The constraint can reference any column in another table, even a column that has not been designated as the primary key for the referenced table. D. The constraint exists between two tables, called the parent table and the child table.
C. The constraint can reference any column in another table, even a column that has not been designated as the primary key for the referenced table.
Q. Which of the following SQL statements was most likely used to create the PROMOTION table? CREATE TABLE promotion (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2)); CREATE TABLE promotion AS (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2)); CREATE TABLE promotion ADD (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2)); CREATE TABLE promotion (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2);
Q. Which of the following SQL statements will delete the private synonym named MYSYNON?
DROP PRIVATE SYNONYM mysynon; DROP PUBLIC SYNONYM mysynon; DROP SYNONYM mysynon; *DELETE PRIVATE SYNONYM mysynon;*
Q. SQL statements that define the tables in a database are referred to as _____________________ statements
data definition language
Q. In an SQL query, which built-in function is used to compute the number of rows in a table? A) AVG B) COUNT C) MAX D) SUM
Q. The NOT NULL constraint can only be created at the ____ level.
Q. Which of the following data modeling steps involves encoding the concept into SQL programming?
Q. Single-row functions return one row of results for each group or category of rows processed.
Q. When does a COMMIT command explicitly occur?
When the user executes COMMIT;.
Q. When designing tables a ____ structure is preferred.
Q. Data stored in multiple tables can be combined through the use of an ORDER BY clause.
Q. an attacker inserts SQL database commands into a data input field of an order form used by a web-based application
implementing client-side validation
Q. The four sections of a basic SQL statement include clauses that begin with which group of keywords?
SELECT, FROM, WHERE, ORDER BY
Q. The _____ process analyzes SQL queries and finds the most efficient way to access data.
Q. Preceding a condition by the ____ operator reverses the truth of the original condition.
Q. Which of the following terms refers to a group of related records?
Q. Which of the following SQL statements will insert a new row into the PROMOTION table?
INSERT INTO promotion (gift, minretail, maxretail) VALUES (‘FREE BOOK‘, 75.01, 89.99);
Q. SQL injection is based on what? A) Having database admin privileges B) Creating an SQL statement that is always true C) Creating an SQL statement that will force access D) Understanding web programming
B) Creating an SQL statement that is always true
Q. In standard SQL, the optimizer hint FIRST_ROWS is generally used for _____ mode processes. a. real-time b. interactive c. batch d. transaction
Q. Referential Integrity Constraints are generally established between:
Primary and Foreign keys.
Q. The most commonly used form of join operation is the: A) outer join. B) union join. C) equi-join. D) natural join.
Q. If you are using mixed mode, what account is the build-in SQL administrator account? a) administrator b) sysadmin c) root d) sa
sa - this is the built-in SQL administrator account associated with SQL authentication; less secure than Windows logins, so avoiding mixed mode is recommended.
Q. Ensuring that each SQL statement independently processes consistent rows is known as: A) transaction level consistency. B) independent consistency. C) statement level consistency. D) process level consistency. E) serializable consistency.
C) statement level consistency.