Category «1z0-007»

Which query should you use?

Examine the structure of the EMPLOYEES and DEPARTMENTS tables:EMPLOYEESEMPLOYEE_ID NUMBER DEPARTMENT_ID NUMBERMANAGER_ID NUMBERLAST_NAME VARCHAR2(25)DEPARTMENTSDEPARTMENT_ID NUMBERMANAGER_ID NUMBERDEPARTMENT_NAME VARCHAR2(35)LOCATION_ID NUMBERYou want to create a report displaying employee last names, department names, and locations.Which query should you use? A.SELECT last_name, department_name, location_id FROM employees , departments ; B.SELECT employees.last_name, departments.department_name, departments.location_id FROM employees e, departments D WHERE e.department_id …

What is true about this SQL statement ?

The EMP table contains these columns: LAST_NAME VARCHAR2 (25)SALARY NUMBER (6,2)DEPARTMENT_ID NUMBER (6)You need to display the employees who have not been assigned to any department. You write theSELECT statement:SELECT LAST_NAME, SALARY, DEPARTMENT_IDFROM EMPWHERE DEPARTMENT_ID = NULL;What is true about this SQL statement ? A.The column in the WHERE clause should be changed to display …

Which change must be made to the above syntax to calculate the annual compensation as "monthly salary plu

Evaluate this SQL statement:SELECT ename, sal, 12*sal+100FROM emp;The SAL column stores the monthly salary of the employee. Which change must be made to theabove syntax to calculate the annual compensation as “monthly salary plus a monthly bonus of$100, multiplied by 12″? A.SELECT ename, sal, 12*(sal+100) FROM emp; B.SELECT ename, sal+100,*12 FROM emp; C.No change is …

What are two reasons to create synonyms?

What are two reasons to create synonyms? (Choose two.) A.You have too many tables. B.Your tables names are too long. C.Your tables have difficult names. D.You want to work on your own tables. E.You want to use another schema’s tables. F.You have too many columns in your tables. Explanation: :Create a synonyms when the names …

What does the statement provide?

The EMPLOYEES table contains these columns:LAST_NAME VARCHAR2 (25)SALARY NUMBER (6,2)COMMISSION_PCT NUMBER (6)You need to write a query that will produce these results:1. Display the salary multiplied by the commission_pct.2. Exclude employees with a zero commission_pct.3. Display a zero for employees with a null commission value.Evaluate the SQL statement:SELECT LAST_NAME, SALARY*COMMISSION_PCTFROM EMPLOYEESWHERE COMMISSION_PCT IS NOT NULL;What …

which case would you use a FULL OUTER JOIN?

In which case would you use a FULL OUTER JOIN? A.Both tables have NULL values. B.You want all unmatched data from one table. C.You want all matched and unmatched data from only one table. D.You want all unmatched data from both tables. E.You want all matched data from both tables. F.One of the tables has …

which columns would an index be automatically created when you execute the above SQL statement?

Examine the SQL statement that creates ORDERS table:CREATE TABLE orders(SER_NO NUMBER UNIQUE,ORDER_ID NUMBER,ORDER_DATE DATE NOT NULL,STATUS VARCHAR2(10) CHECK (status IN (‘CREDIT’, ‘CASH’)),PROD_ID NUMBERREFERENCES PRODUCTS(PRODUCT_ID),ORD_TOTAL NUMBER,PRIMARY KEY (order_id, order_date));For which columns would an index be automatically created when you execute the above SQLstatement? (Choose two.) A.ORDER_ID B.SER_NO C.PROD_ID D.ORD_TOTAL E.composite index on ORDER_ID and ORDER_DATE F.STATUS …

How will the results be sorted?

The EMP table contains these columns:EMPLOYEE_ID NUMBER(4)EMPNAME VARCHAR2 (25)SALARY NUMBER(9,2)HIRE_DATE DATEYou query the database with this SQL statement:SELECT empname,hire_date HIREDATE, salaryFROM EMP ORDER BY hire_date;How will the results be sorted? A.descending alphabetically B.descending by date C.randomly D.ascending by date E.ascending alphabetically Show Answer

Which SQL statement defines a FOREIGN KEY constraint on the DEPTNO column of the EMP table?

Which SQL statement defines a FOREIGN KEY constraint on the DEPTNO column of the EMPtable? A.CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno)); B.CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno); C.CREATE TABLE …