多项选择题

Examine the description of the STUDENTS table:

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)


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

The EMPLOYEE tables has these columns:
LAST_NAME VARCHAR2(35)
SALARY NUMBER(8,2)
COMMISSION_PCT NUMBER(5,2)
You want to display the name and annual salary multiplied by the commission_pct for all employees. For records that have a NULL commission_pct, a zero must be displayed against the calculated column.
Which SQL statement displays the desired results?()

A. SELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;
B. SELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;
C. SELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;
D. SELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;

2.多项选择题

Examine the description of the STUDENTS table:
STD_ID NUMBER(4)
COURSE_ID VARCHARD2(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)

3.单项选择题Which syntax turns an existing constraint on?()

A. ALTER TABLE table_name   ENABLE constraint_name;
B. ALTER TABLE table_name   STATUS = ENABLE CONSTRAINT constraint_name;
C. ALTER TABLE table_name   ENABLE CONSTRAINT constraint_name;
D. ALTER TABLE table_name   STATUS ENABLE CONSTRAINT constraint_name;
E. ALTER TABLE table_name   TURN ON CONSTRAINT constraint_name;

4.单项选择题Which syntax turns an existing constraint on?()

A. ALTER TABLE table_name ENABLE constraint_name;
B. ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint _ name;
C. ALTER TABLE table_name ENABLE CONSTRAINT constraint _ name;
D. ALTER TABLE table_name TURN ON CONSTRAINT constraint _ name;

5.单项选择题

Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP table. The EMP table contains these columns:

Which statement ensures that a value is displayed in the calculated columns for all employees?()

A. SELECT last_name, 12*salary* commission_pct FROM emp;
B. SELECT last_name, 12*salary* (commission_pct,0) FROM emp;
C. SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;
D. SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;

6.单项选择题

Examine the description of the EMPLOYEES table:

Which statement shows the maximum salary paid in each job category of each department?()

A. SELECT dept_id, job_cat, MAX(salary)   FROM employees   WHERE salary > MAX(salary);
B. SELECT dept_id, job_cat, MAX(salary)   FROM employees   GROUP BY dept_id, job_cat;
C. SELECT dept_id, job_cat, MAX(salary)   FROM employees;
D. SELECT dept_id, job_cat, MAX(salary)   FROM employees   GROUP BY dept_id;
E. SELECT dept_id, job_cat, MAX(salary)   FROM employees   GROUP BY dept_id, job_cat, salary;

7.单项选择题

Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP table. The EMP table contains these columns:
LAST NAME VARCNAR2(35) NOT NULL
SALARY NUMBER(9,2) NOT NULL
COMMISION_PCT NUMBER(4,2)
Which statement ensures that a value is displayed in the calculated columns for all employees?()

A. SELECT last_name, 12*salary* commission_pct FROM emp;
B. SELECT last_name, 12*salary* (commission_pct,0) FROM emp;
C. SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;
D. SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;

8.单项选择题

Examine the description of the EMPLOYEES table:
EMP_ID NUMBER(4) NOT NULL
LAST_NAME VARCHAR2(30) NOT NULL
FIRST_NAME VARCHAR2(30)
DEPT_ID NUMBER(2)
JOB_CAT VARCHARD2(30)
SALARY NUMBER(8,2)
Which statement shows the maximum salary paid in each job category of each department?()

A. SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary > MAX (salary);
B. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;
C. SELECT dept_id, job_cat, MAX(salary) FROM employees;
D. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;
E. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;

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

A. A view can be created as read only.
B. A view can be created as a join on two or more tables.
C. A view cannot have an ORDER BY clause in the SELECT statement.
D. A view cannot be created with a GROUP BY clause in the SELECT statement.
E. A view must have aliases defined for the column names in the SELECT statement.

10.单项选择题

The database administrator of your company created a public synonym called HR for the HUMAN_RESOURCES table of the GENERAL schema, because many users frequently use this table. As a user of the database, you created a table called HR in your schema. What happens when you execute this query?
SELECT *
FROM HR;()

A. You obtain the results retrieved from the public synonym HR created by the database administrator.
B. You obtain the results retrieved from the HR table that belongs to your schema.
C. You get an error message because you cannot retrieve from a table that has the same name as a public synonym.
D. You obtain the results retrieved from both the public synonym HR and the HR table that belongs to your schema, as a Cartesian product.
E. You obtain the results retrieved from both the public synonym HR and the HR table that belongs to your schema, as a FULL JOIN.