Examine the data in the EMPLOYEES and DEPARTMENTS tables.
EMPLOYEES
LAST_NAME DEPARTMENT_ID SALARY
Getz 10 3000
Davis 20 1500
Bill 20 2200
Davis 30 5000
Kochhar 5000
DEPARTMENTS
DEPARTMENT_ID DEPARTMENT_NAME
10 Sales
20 Marketing
30 Accounts
40 Administration
You want to retrieve all employees, whether or not they have matching departments in the departments table.
Which query would you use?()
A. SELECT last_name, department_name FROM employees , departments(+);
B. SELECT last_name, department_name FROM employees JOIN departments(+);
C. SELECT last_name, department_name ON (e. department_ id = d. departments_id); FROM employees(+) e JOIN departments d
D. SELECT last_name, department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);
E. SELECT last_name, department_name FROM employees(+) , departments ON (e. department _ id = d. department _id);
F. SELECT last_name, department_name FROM employees e LEFT OUTER JOIN departments d ON (e. department _ id = d. department _id);
您可能感兴趣的试卷
你可能感兴趣的试题
You need to give the MANAGER role the ability to select from, insert into, and modify existing rows in the STUDENT_GRADES table. Anyone given this MANAGER role should be able to pass those privileges on to others.
Which statement accomplishes this?()
A. GRANT select, insert, update ON student_grades TO manager;
B. GRANT select, insert, update ON student_grades TO ROLE manager;
C. GRANT select, insert, modify ON student_grades TO manager WITH GRANT OPTION;
D. GRANT select, insert, update ON student_grades TO manager WITH GRANT OPTION;
E. GRANT select, insert, update ON student_grades TO ROLE manager WITH GRANT OPTION;
F. GRANT select, insert, modify ON student_grades TO ROLE manager WITH GRANT OPTION;
A. INSERT INTO employees VALUES ( NULL, ‘John’,‘Smith’);
B. INSERT INTO employees( first_name, last_name) VALUES(‘John’,‘Smith’);
C. INSERT INTO employees VALUES (‘1000’,‘John’,NULL);
D. INSERT INTO employees(first_name,last_name, employee_id) VALUES ( 1000, ‘John’,‘Smith’);
E. INSERT INTO employees (employee_id) VALUES (1000);
F. INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, ‘John’,‘’);
The CUSTOMERS table has these columns:
CUSTOMER_ID NUMBER(4) NOT NULL
CUSTOMER_NAME VARCHAR2(100) NOT NULL
STREET_ADDRESS VARCHAR2(150)
CITY_ADDRESS VARCHAR2(50)
STATE_ADDRESS VARCHAR2(50)
PROVINCE_ADDRESS VARCHAR2(50)
COUNTRY_ADDRESS VARCHAR2(50)
POSTAL_CODE VARCHAR2(12)
CUSTOMER_PHONE VARCHAR2(20)
A promotional sale is being advertised to the customers in France. Which WHERE clause identifies customers that are located in France?()
A.WHERE lower(country_address) = "france"
B.WHERE lower(country_address) = 'france'
C.WHERE lower(country_address) IS 'france'
D.WHERE lower(country_address) = '%france%'
E.WHERE lower(country_address) LIKE %france%
A.The indexed column is declared as NOT NULL.
B.The indexed columns are used in the FROM clause.
C.The indexed columns are part of an expression.
D.The indexed column contains a wide range of values.
A.The inner query always sorts the results of the outer query.
B.The outer query always sorts the results of the inner query.
C.The outer query must return a value to the inner query.
D.The inner query returns a value to the outer query.
E.The inner query must always return a value or the outer query will give an error.
Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
You issue these statements:
CREATE table new_emp ( employee_id NUMBER, name VARCHAR2(30));
INSERT INTO new_emp SELECT employee_id , last_name from employees;
Savepoint s1;
UPDATE new_emp set name = UPPER(name);
Savepoint s2;
Delete from new_emp;
Rollback to s2;
Delete from new_emp where employee_id =180;
UPDATE new_emp set name = 'James';
Rollback to s2;
UPDATE new_emp set name = 'James' WHERE employee_id =180;
Rollback;
At the end of this transaction, what is true?()
A.You have no rows in the table.
B.You have an employee with the name of James.
C.You cannot roll back to the same savepoint more than once.
D.Your last update fails to update any rows because employee ID 180 was already deleted.
Click the Exhibit button and examine the data in the EMPLOYEES table.
Which three subqueries work? ()
A.SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);
B.SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);
C.SELECT distinct department_id FROM employees WHERE salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);
D.SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);
E.SELECT last_name FROM employees WHERE salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);
F.SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));
A. SELECT TO_CHAR(2000, '$#,###.##') FROM dual;
B. SELECT TO_CHAR(2000, '$0,000.00') FROM dual;
C. SELECT TO_CHAR(2000, '$9,999.00') FROM dual;
D. SELECT TO_CHAR(2000, '$9,999.99') FROM dual;
E. SELECT TO_CHAR(2000, '$2,000.00') FROM dual;
F. SELECT TO_CHAR(2000, '$N,NNN.NN') FROM dual;
Examine the description of the STUDENTS table:
STD_ID NUMBER(4)
COURSE_ID VARCHAR2(10)
START_DATE DATE
END_DATE DATE
Which two aggregate functions are valid on the START_DATE column? ()
A.SUM(start_date)
B.AVG(start_date)
C.COUNT(start_date)
D.AVG(start_date,end_date)
E.MIN(start_date)
F.MAXIMUM(start_date)
Examine this statement:
SELECT student_id, gpa
FROM student_grades
WHERE gpa > &&value;
You run the statement once, and when prompted you enter a value of 2.0. A report is produced. What happens when you run the statement a second time?()
A.An error is returned.
B.You are prompted to enter a new value.
C.A report is produced that matches the first report produced.
D.You are asked whether you want a new value or if you want to run the report based on the previous value.
最新试题
Examine the structure of the STUDENTS table:STUDENT_ID NUMBER NOT NULL, Primary KeySTUDENT_NAME VARCHAR2(30)COURSE_ID VARCHAR2(10) NOT NULLMARKS NUMBERSTART_DATE DATEFINISH_DATE DATEYou need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999.Which SQL statement accomplishes this task? ()
Which statement accomplish this? ()
The PRODUCTS table has these columns:PRODUCT_ID NUMBER(4)PRODUCT_NAME VARCHAR2(45)PRICE NUMBER(8,2)Evaluate this SQL statement:SELECT *FROM PRODUCTSORDER BY price, product _ name;What is true about the SQL statement? ()
The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this? ()
Which is an iSQL*Plus command? ()
Which statement correctly describes SQL and /SQL*Plus? ()
What is true regarding subqueries?()
Examine the statement: Create synonym emp for hr. employees; What happens when you issue the statement? ()
Which view should a user query to display the columns associated with the constraints on a table owned by the user? ()
Which three statements about subqueries are true? ()