单项选择题

The EMP table contains these columns:
EMPLOYEE_ID NUMBER(4)
EMPNAME VARCHAR2 (25)
SALARY NUMBER(9,2)
HIRE_DATE DATE
You query the database with this SQL statement:
SELECT empname,hire_date HIREDATE, salary
FROM EMP
ORDER BY hire_date;
How will the results be sorted?()

A.randomly
B.ascending by date
C.descending by date
D.ascending alphabetically
E.descending alphabetically


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题Evaluate the SQL statement: TRUNCATE TABLE DEPT;Which three are true about the SQL statement? ()

A.It releases the storage space used by the table.
B.It does not release the storage space used by the table.
C.You can roll back the deletion of rows after the statement executes.
D.You can NOT roll back the deletion of rows after the statement executes.
E.An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will display an error.
F.You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate the DEPT table.

3.多项选择题Which three are DATETIME data types that can be used when specifying column definitions? ()

A.TIMESTAMP
B.INTERVAL MONTH TO DAY
C.INTERVAL DAY TO SECOND
D.INTERVAL YEAR TO MONTH
E.TIMESTAMP WITH DATABASE TIMEZONE

4.单项选择题You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()

A.ALTER TABLE students ADD PRIMARY KEY student_id;
B.ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
C.ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
D.ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
E.ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

5.多项选择题

Click the Exhibit button and examine the data from the EMP table.
The COMMISSION column shows the monthly commission earned by the employee.
Which three tasks would require subqueries or joins in order to be performed in a single step?()

A.deleting the records of employees who do not earn commission
B.increasing the commission of employee 3 by the average commission earned in department 20
C.finding the number of employees who do NOT earn commission and are working for department 20
D.inserting into the table a new employee 10 who works for department 20 and earns a commission that is equal to the commission earned by employee 3
E.creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSION of the EMP table
F.decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more than 800

6.单项选择题

Evaluate this SQL statement:
SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAME
FROM EMPLOYEES e, DEPARTMENTS 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

8.单项选择题

Examine the structure of the EMP_DEPT_VU view:
Column Name Type Remarks
EMPLOYEE_ID NUMBER From the EMPLOYEES table
EMP_NAME VARCHAR2(30) From the EMPLOYEES table
JOB_ID VARCHAR2(20) From the EMPLOYEES table
SALARY NUMBER From the EMPLOYEES table
DEPARTMENT_ID NUMBER From the DEPARTMENTS table
DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table
Which SQL statement produces an error?()

A.SELECT*FROMemp_dept_vu;
B.SELECTdepartment_id,SUM(salary)FROMemp_dept_vuGROUPBYdepartment_id;
C.SELECTdepartment_id,job_id,AVG(salary)FROMemp_dept_vuGROUPBYdepartment_id,job_id;
D.SELECTjob_id,SUM(salary)FROMemp_dept_vuWHEREdepartment_idIN(10,20)GROUPBYjob_idHAVINGSUM(salary)>;20000;
E.Noneofthestatementsproduceanerror;allarevalid

10.单项选择题

Evaluate this SQL statement:
SELECT ename, sal, 12*sal+100
FROM emp;
The SAL column stores the monthly salary of the employee. Which change must be made to the above syntax to calculate the annual compensation as "monthly salary plus a monthly bonus of $100, multiplied by 12"?()

A.No change is required to achieve the desired results.
B.SELECT ename, sal, 12*(sal+100) FROM emp;
C.SELECT ename, sal, (12*sal)+100 FROM emp;
D.SELECT ename, sal+100,*12 FROM emp;

最新试题

User Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She has the privilege to create a public synonym, and would like to create a synonym for this view that can be used by all users of the database. Which SQL statement can Mary use to accomplish that task?()

题型:单项选择题

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? ()

题型:单项选择题

Which two are true about aggregate functions?()

题型:多项选择题

Evaluate these two SQL statements: SELECT last_name, salary, hire_dateFROM EMPLOYEES ORDRE BY salary DESC; SELECT last_name, salary, hire_dateFROM EMPOLYEES ORDER BY 2 DESC; What is true about them? ()

题型:单项选择题

For which action can you use the TO_DATE function? ()

题型:单项选择题

The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this? ()

题型:单项选择题

What is true regarding subqueries?()

题型:单项选择题

Examine the statement: Create synonym emp for hr. employees; What happens when you issue the statement? ()

题型:单项选择题

Which statement correctly describes SQL and /SQL*Plus? ()

题型:单项选择题

Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2 (25)LAST_NAME VARCHAR2 (25)HIRE_DATE DATEWhich UPDATE statement is valid? ()

题型:单项选择题