Q1. View the Exhibit and examine the structures of the employees and departments tables. You want to update the employees table as follows: -Update only those employees who work in Boston or Seattle (locations 2900 and 2700). -Set department_id for these employees to the department_id corresponding to London (location_id 2100). -Set the employees' salary in iocation_id 2100 to 1.1 times the average salary of…
Q1. You want to create a table employees in which the values of columns EMPLOYEES_ID and LOGIN_ID must be unique and not null. Which two SQL statements would create the required table? A. Option A B. Option B C. Option C D. Option D E. Option E F. Option F View AnswerAnswer: D,E Q2. View the Exhibit and examine the data in the promotions table. PROMO_BEGIN_DATE is stored in…
Q1. Examine the structure of the orders table: You want to find the total value of all the orders for each year and issue the following command: Which statement is true regarding the outcome? A. It executes successfully and gives the correct output. B. It gives an error because the TO_CHAR function is not valid. C. It executes successfully but does not give the correct…
Q1. Examine the structure of the transactions table: You want to display the date, time, and transaction amount of transactions that where done before 12 noon. The value zero should be displayed for transactions where the transaction amount has not been entered. Which query gives the required result? A. Option A B. Option B C. Option C D. Option D View AnswerAnswer: B Q2. Examine the structure of…
Q1. Evaluate the following query: What would be the outcome of the above query? A. It produces an error because flower braces have been used. B. It produces an error because the data types are not matching. C. It executes successfully and introduces an 's at the end of each PROMO_NAME in the output. D. It executes successfully and displays the literal "{'s start date…
Q1. Which create table statement is valid? A. Option A B. Option B C. Option C D. Option D View AnswerAnswer: D Explanation: PRIMARY KEY Constraint A PRIMARY KEY constraint creates a primary key for the table. Only one primary key can be created for each table. The PRIMARY KEY constraint is a column or a set of columns that uniquely identifies each row in a table.…
Q1. You want to create a sales table with the following column specifications and data types: 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…
Q1. You need to list the employees in DEPARTMENT_ID 30 in a single row, ordered by HIRE_DATE. Examine the sample output: Which query will provide the required output? A. Option A B. Option B C. Option C D. Option D View AnswerAnswer: B Reference: http://docs.oracle.com/cd/E11882_01/server.112/e10592/functions089.htm Q2. Evaluate the following SQL statement: Which statement is true regarding the above query if one of the values generated by the subquery is null? A.…
Q1. View the Exhibit and examine the structure of the customers table. Using the customers table, you need to generate a report that shows an increase in the credit limit by 15% for all customers. Customers whose credit limit has not been entered should have the message "Not Available" displayed. Which SQL statement would produce the required result? A. Option A B. Option B C.…