单项选择题You need to calculate the total of all salaries in the accounting department. Which group function should you use? ()

A. MAX
B. MIN
C. SUM
D. COUNT
E. TOTAL
F. LARGEST


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题You define a multiple-row subquery in the WHERE clause of an SQL query with a comparison operator "=". What happens when the main query is executed? ()

A. The main query executes with the first value returned by the subquery.
B. The main query executes with the last value returned by the subquery.
C. The main query executes with all the values returned by the subquery.
D. The main query fails because the multiple-row subquery cannot be used with the comparison operator.
E. You cannot define a multiple-row subquery in the WHERE clause of a SQL query.

2.多项选择题Which three statements correctly describe the functions and use of constraints? ()

A. Constraints provide data independence.
B. Constraints make complex queries easy.
C. Constraints enforce rules at the view level.
D. Constraints enforce rules at the table level.
E. Constraints prevent the deletion of a table if there are dependencies.
F. Constraints prevent the deletion of an index if there are dependencies.

3.多项选择题Which two are character manipulation functions? ()

A. TRIM
B. REPLACE
C. TRUNC
D. TO_DATE
E. MOD
F. CASE

4.单项选择题Evaluate this SQL statement: SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAME FROM EMP e, DEPARTMENT d WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID; In the statement, which capabilities of a SELECT statement are performed?()

A. Selection, projection, join
B. Difference, projection, join
C. Selection, intersection, join
D. Intersection, projection, join
E. Difference, projection, product

5.单项选择题You need to perform certain data manipulation operations through a view called EMP_DEPT_VU, which you previously created. You want to look at the definition of the view (the SELECT statement on which the view was create.) How do you obtain the definition of the view? ()

A. Use the DESCRIBE command in the EMP_DEPT VU view.
B. Use the DEFINE VIEW command on the EMP_DEPT VU view.
C. Use the DESCRIBE VIEW command on the EMP_DEPT VU view.
D. Query the USER_VIEWS data dictionary view to search for the EMP_DEPT_VU view.
E. Query the USER_SOURCE data dictionary view to search for the EMP_DEPT_VU view.
F. Query the USER_OBJECTS data dictionary view to search for the EMP_DEPT_VU view.

6.单项选择题You need to display the last names of those employees who have the letter "A" as the second character in their names. Which SQL statement displays the required results? ()

A. SELECT last_name FROM EMP WHERE last_ name LIKE '_A%';
B. SELECT last_name FROM EMP WHERE last name ='*A%'
C. SELECT last_name FROM EMP WHERE last name ='_A%';
D. SELECT last_name FROM EMP WHERE last name LIKE '*A%'

7.单项选择题Which operator can be used with a multiple-row subquery? ()

A. =
B. LIKE
C. BETWEEN
D. NOT IN
E. IS
F. <>

8.单项选择题

Examine the structure of the EMPLOYEES table:
Column name Data type Remarks
EMPLOYEE_ID NUMBER NOT NULL, Primary Key
LAST_NAME VARCNAR2(30)
FIRST_NAME VARCNAR2(30)
JOB_ID NUMBER
SAL NUMBER
MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER
You need to create an index called NAME_IDX on the first name and last name fields of the EMPLOYEES table. Which SQL statement would you use to perform this task? ()

A. CREATE INDEX NAME _IDX (first_name, last_name);
B. CREATE INDEX NAME _IDX (first_name, AND last_name)
C. CREATE INDEX NAME_IDX ON (First_name, last_name);
D. CREATE INDEX NAME_IDX ON employees (First_name, AND last_name);
E. CREATE INDEX NAME_IDX ON employees (First_name, last_name);
F. CREATE INDEX NAME_IDX FOR employees (First_name, last_name);

9.多项选择题Which four are correct guidelines for naming database tables? ()

A. Must begin with either a number or a letter.
B. Must be 1-30 characters long.
C. Should not be an Oracle Server reserved word.
D. Must contain only A-Z, a-z, 0-+, _, *, and #.
E. Must contain only A-Z, a-z, 0-9, _, $, and #.
F. Must begin with a letter.

10.多项选择题Which two statements about sequences are true? ()

A. You use a NEXTVAL pseudo column to look at the next possible value that would be generated from a sequence, without actually retrieving the value.
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 generated from the sequence.
C. You use a NEXTVAL pseudo column to obtain the next possible value from a sequence by actually retrieving the value from the sequence.
D. You use a CURRVAL pseudo column to generate a value from a sequence that would be used for a specified database column.
E. If a sequence starting from a value 100 and incremented by 1 is used by more then one application, then all of these applications could have a value of 105 assigned to their column whose value is being generated by the sequence.
F. You use REUSE clause when creating a sequence to restart the sequence once it generates the maximum value defined for the sequence.