Tag «Exam 1z0-007»

Which SQL statement do you use?

The EMPLOYEES table contains these columns:EMPLOYEE_ID NUMBER(4)LAST_NAME VARCHAR2 (25)JOB_ID VARCHAR2(10)You want to search for strings that contain ‘SA_’ in the JOB_ID column. Which SQL statement doyou use? A.SELECT employee_id, last_name, job_id FROM employees WHERE job_id = ‘%SA_’; B.SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE ‘%SA_’; C.SELECT employee_id, last_name, job_id FROM employees WHERE job_id …

What happens when you execute this DELETE statement?

You own a table called EMPLOYEES with this table structure:EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEWhat happens when you execute this DELETE statement? DELETE employees; A.You get an error because of a primary key violation. B.The data and structure of the EMPLOYEES table are deleted. C.You get an error because the statement is not syntactically …

Which statement accomplishes this?

You need to create a table named ORDERS that contains four columns:1. an ORDER_ID column of number data type2. a CUSTOMER_ID column of number data type3. an ORDER_STATUS column that contains a character data type4. a DATE_ORDERED column to contain the date the order was placedWhen a row is inserted into the table, if no …

which capabilities of a SELECT statement are performed?

Evaluate this SQL statement:SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAMEFROM EMPLOYEES e, DEPARTMENTS dWHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID;In the statement, which capabilities of a SELECT statement are performed? A.selection, projection, join B.selection, intersection, join C.intersection, projection, join D.difference, projection, product E.difference, projection, join Explanation: Selection, projection and join capabilities of a SELECT statement are performed in this view. Show Answer

Which three are DATETIME data types that can be used when specifying column definitions?

Which three are DATETIME data types that can be used when specifying column definitions?(Choose three.) A.INTERVAL YEAR TO MONTH B.INTERVAL DAY TO SECOND C.TIMESTAMP D.INTERVAL MONTH TO DAY E.TIMESTAMP WITH DATABASE TIMEZONE Explanation: TIMESTAMP, INTERVAL DAY TO SECOND and INTERVAL YEAR TO MONTH can be used tospecify column definition. Show Answer

Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?

Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12? A.SELECT ename, salary*12 ‘Annual Salary’ FROM employees; B.SELECT ename, salary*12 AS INITCAP(“ANNUAL SALARY”) FROM employees C.SELECT ename, salary*12 “Annual Salary” FROM employees; D.SELECT ename, salary*12 AS Annual Salary FROM employees; Explanation: This SQL statement provides correct syntax to generate the alias Annual …

Which three statements insert a row into the table?

Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)Which three statements insert a row into the table? (Choose three.) A.INSERT INTO employees( first_name, last_name) VALUES( ‘John’, ‘Smith’); B.INSERT INTO employees VALUES ( NULL, ‘John’, ‘Smith’); C.INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, ‘John’, ‘ ‘); D.INSERT INTO employees (employee_id) …

Which SELECT statement should you use to extract the year from the system date and display it in the format &q

Which SELECT statement should you use to extract the year from the system date and display itin the format “1998”? A.SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),’yyyy’) FROM dual; B.SELECT DECODE(SUBSTR(SYSDATE, 8), ‘year’) FROM dual; C.SELECT TO_DATE(SYSDATE,’yyyy’) FROM dual; D.SELECT TO_CHAR(SYSDATE,’yyyy’) FROM dual; E.SELECT DECODE(SUBSTR(SYSDATE, 8), ‘YYYY’) FROM dual; Explanation: Function TO_CHAR(x, y) converts the value x to a …

Which two statements about sequences are true?

Which two statements about sequences are true? (Choose two.) A.You use a CURRVAL pseudo column to generate a value from a sequence that would be used for a specified database column. B.You use a CURRVAL pseudo column to look at the current value just generated from a sequence, without affecting the further values to be …

which two cases would you use an outer join?

In which two cases would you use an outer join? (Choose two.) A.Only when the tables have a primary key-foreign key relationship. B.The tables being joined have NOT NULL columns. C.The tables being joined have both matched and unmatched data. D.The columns being joined have NULL values. E.The tables being joined have only matched data. …