Examine the data of the EMPLOYEES table.
EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID)
Evaluate this SQL statement:
What is its output?()
A.
B.
C.
D.
E. The SQL statement produces an error.
您可能感兴趣的试卷
你可能感兴趣的试题
A. SELECT TO_CHAR(SYSDATE,'yyyy') FROM dual;
B. SELECT TO_DATE(SYSDATE,'yyyy') FROM dual;
C. SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual;
D. SELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual;
E. SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),'yyyy') FROM dual;
The EMPLOYEES table contains these columns:
LAST_NAME VARCHAR2 (25)
SALARY NUMBER (6,2)
COMMISSION_PCT NUMBER (6)
You need to write a query that will produce these results:
1. Display the salary multiplied by the commission_pct.
2. Exclude employees with a zero commission_pct.
3. Display a zero for employees with a null commission value.
Evaluate the SQL statement:
SELECT LAST_NAME, SALARY*COMMISSION_PCT
FROM EMPLOYEES
WHERE COMMISSION_PCT IS NOT NULL;
What does the statement provide?()
A.All of the desired results
B.Two of the desired results
C.One of the desired results
D.An error statement
A. Create groups of data
B. Sort data in a specific order
C. Convert data to a different format
D. Retrieve data based on an unknown condition
A. WHERE
B. HAVING
C. RESTRICT
D. GROUP BY
E. ORDER BY
Scott issues the SQL statements:
CREATE TABLE dept
(deptno NUMBER(2),
dname VARCHAR2(14),
loc VARCHAR2(13)};
GRANT SELECT
ON DEPT
T0 SUE;
If Sue needs to select from Scott's DEPT table, which command should she use?()
A.SELECT*FROMDEPT;
B.SELECT*FROMSCOTT.DEPT;
C.SELECT*FROMDBASCOTTDEPT;
D.SELECT*FROMALL_USERSWHEREUSER_NAME=';SCOTT';ANDTABLENAME=';DEPT';;
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.
A. A single row subquery can retrieve data from only one table.
B. A SQL query statement cannot display data from table B that is referred to in its subquery, unless table B is included in the main query's FROM clause.
C. A SQL query statement can display data from table B that is referred to in its subquery, without including table B in its own FROM clause.
D. A single row subquery can retrieve data from more than one table.
E. A single row subquery cannot be used in a condition where the LIKE operator is used for comparison.
F. A multiple-row subquery cannot be used in a condition where the LIKE operator is used for comparison.
A. MAX
B. MIN
C. SUM
D. COUNT
E. TOTAL
F. LARGEST
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.
最新试题
Examine these statements:CREATE ROLE registrarGRANT UPDATE ON dtudent_grades TO registrar;GRANT registrar to user1, user2, user3;What does this set of SQL statements do? ()
Which two are true about aggregate functions?()
Which constraint can be defined only at the column level? ()
Which object privileges can be granted on a view? ()
Which three are true? ()
Which view should a user query to display the columns associated with the constraints on a table owned by the user? ()
Evaluate this SQL statement:SELECT e.emp_name, d.dept_nameFROM employees eJOIN departments dUSING (department_id)WHERE d.department_id NOT IN (10,40)ORSER BY dept_name;The statement fails when executed. Which change fixes the error? ()
Which two statements are true about constraints? ()
For which action can you use the TO_DATE function? ()
In which two cases would you use an outer join? ()