多项选择题Which four are attributes of single row functions? ()

A.cannot be nested
B.manipulate data items
C.act on each row returned
D.return one result per row
E.accept only one argument and return only one value
F.accept arguments which can be a column or an expression


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

Evaluate this SQL statement:
e.employee_id, (.15* e.salary) + (.5 * e.commission_pct)
+ (s.sales_amount * (.35 * e.bonus)) AS CALC_VALUE
FROM employees e, sales s
WHERE e.employee_id = s.emp_id;
What will happen if you remove all the parentheses from the calculation?()

A.The value displayed in the CALC_VALUE column will be lower.
B.The value displayed in the CALC_VALUE column will be higher.
C.There will be no difference in the value displayed in the CALC_VALUE column.
D.An error will be reported.

2.单项选择题

Examine the structure of the EMPLOYEES table:
Column name Data type Remarks
EMPLOYEE_ID NUMBER NOT NULL, Primary Key
EMP_NAME VARCHAR2(30)
JOB_ID VARCHAR2(20) NOT NULL
SAL NUMBER
MGR_ID NUMBER References EMPLOYEE_ID column
DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column
of the DEPARTMENTS table
You need to create a view called EMP_VU that allows the users to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the users to insert rows?()

A.CREATE VIEW emp_vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);
B.CREATE VIEW emp_vu AS SELECT employee_id, emp_name, job_id, department_id FROM employees WHERE mgr_id IN (102, 120);
C.CREATE VIEW emp_vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_id;
D.CREATE VIEW emp_vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;

3.多项选择题Which two statements are true about WHERE and HAVING clauses? ()

A.A WHERE clause can be used to restrict both rows and groups.
B.A WHERE clause can be used to restrict rows only.
C.A HAVING clause can be used to restrict both rows and groups.
D.A HAVING clause can be used to restrict groups only.
E.A WHERE clause CANNOT be used in a query if the query uses a HAVING clause.
F.A HAVING clause CANNOT be used in subqueries.

4.多项选择题In which two cases would you use an outer join? ()

A.The tables being joined have NOT NULL columns.
B.The tables being joined have only matched data.
C.The columns being joined have NULL values.
D.The tables being joined have only unmatched data.
E.The tables being joined have both matched and unmatched data.
F.Only when the tables have a primary key-foreign key relationship.

5.单项选择题

You need to create a table named ORDERS that contains four columns:
1.an ORDER_ID column of number data type
2.a CUSTOMER_ID column of number data type
3.an ORDER_STATUS column that contains a character data type
4.a DATE_ORDERED column to contain the date the order was placed
When a row is inserted into the table, if no value is provided for the status of the order, the value PENDING should be used instead.
Which statement accomplishes this?()

A.CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status NUMBER(10) DEFAULT 'PENDING', date_ordered DATE );
B.CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
C.CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
D.CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
E.CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
F.CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered VARCHAR2 );

6.单项选择题

Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables:
EMPLOYEES
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
NEW_EMPLOYEES
EMPLOYEE_ID NUMBER Primary Key
NAME VARCHAR2(60)
Which DELETE statement is valid?()

A.DELETE FROM employees WHERE employee_id = (SELECT employee_id FROM employees);
B.DELETE * FROM employees WHERE employee_id = (SELECT employee_id FROM new_employees);
C.DELETE FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name ='Carrey');
D.DELETE * FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE last_name ='Carrey');

7.单项选择题Which SQL statement returns a numeric value?()

A.SELECT ADD_MONTHS(MAX(hire_Date), 6) FROM EMP;
B.SELECT ROUND(hire_date) FROM EMP;
C.SELECT sysdate-hire_date FROM EMP;
D.SELECT TO_NUMBER(hire_date + 7) FROM EMP;

8.多项选择题Which two statements complete a transaction? ()

A.DELETE employees;
B.DESCRIBE employees;
C.ROLLBACK TO SAVEPOINT C;
D.GRANT SELECT ON employees TO SCOTT;
E.ALTER TABLE employees SET UNUSED COLUMN sal;
F.SELECT MAX(sal) FROM employees WHERE department_id = 20;

9.多项选择题Which two statements are true about constraints? ()

A.The UNIQUE constraint does not permit a null value for the column.
B.A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.
C.The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.
D.The NOT NULL constraint ensures that null values are not permitted for the column.

10.单项选择题What is true about joining tables through an equijoin?()

A.You can join a maximum of two tables through an equijoin.
B.You can join a maximum of two columns through an equijoin.
C.You specify an equijoin condition in the SELECT or FROM clauses of a SELECT statement.
D.To join two tables through an equijoin, the columns in the join condition must be primary key and foreign key columns.
E.You can join n tables (all having single column primary keys) in a SQL statement by specifying a minimum of n-1 join conditions.