Evaluate the following CREATE TABLE command:
Which statement is true regarding the above SQL statement?
Correct Answer:
A
View the Exhibit and examine the data in the employees table.
You want to generate a report showing the total compensation paid to each employee to date. You issue the following query:
What is the outcome?
Correct Answer:
A
View the exhibit and examine the description of the DEPARTMENTS and EMPLOYEES tables.
The retrieve data for all the employees for their EMPLOYEE_ID, FIRST_NAME, and DEPARTMENT NAME, the following SQL statement was written:
SELECT employee_id, first_name, department_name FROM employees
NATURAL JOIN departments;
The desired output is not obtained after executing the above SQL statement. What could be the reason for this?
Correct Answer:
D
Natural join needs only one column to be the same in each table. The EMPLOYEES and DEPARTMENTS tables have two columns that are the same (Department_ID and Manager_ID)
You must create a SALES table with these column specifications and data types: (Choose the best answer.) SALESID: Number
STOREID: Number ITEMID: Number
QTY: Number, should be set to 1 when no value is specified
SLSDATE: Date, should be set to current date when no value is specified
PAYMENT: Characters up to 30 characters, should be set to CASH when no value is specified Which statement would create the table?
Correct Answer:
D
Examine the structure of the BOOKS_TRANSACTIONS table:
You want to display the member IDs, due date, and late fee as $2 for all transactions. Which SQL statement must you execute?
Correct Answer:
B
