单项选择题

The EMPLOYEES table has these columns:
LAST_NAME VARCHAR2(35)
SALARY NUMBER(8,2)
HIRE_DATE DATE
Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:
ALTER TABLE EMPLOYEES
MODIFY (SALARY DEFAULT 5000);
Which is true about your ALTER statement?()

 

A.Column definitions cannot be altered to add DEFAULT values.
B.A change to the DEFAULT value affects only subsequent insertions to the table.
C.Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.
D.All the rows that have a NULL value for the SALARY column will be updated with the value 5000.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

Click the Exhibit button to examine the data of the EMPLOYEES table.
Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee's manager, for all the employees who have a manager and earn more than 4000?()


A.SELECT employee_id "Emp_id", emp_name "Employee", salary, employee_id "Mgr_id", emp_name "Manager" FROM employees WHERE salary > 4000; 
B.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e JOIN employees m WHERE e.mgr_id = m.mgr_id AND e.salary > 4000;
C.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id) AND e.salary > 4000;
D.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.mgr_id "Mgr_id", m.emp_name "Manager" FROM employees e SELF JOIN employees m WHERE e.mgr_id = m.employee_id AND e.salary > 4000;
E.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.mgr_id "Mgr_id" m.emp_name "Manager" FROM employees e JOIN employees m USING (e.employee_id = m.employee_id) AND e.salary > 4000;

2.单项选择题A subquery can be used to().

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

3.单项选择题Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She granted SELECT privilege to Scott on this view. Which option enables Scott to eliminate the need to qualify the view with the name MARY.EMP_DEPT_LOC_VU each time the view is referenced?()

A.Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command CREATE PRIVATE SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
B.Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command CREATE SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
C.Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command CREATE LOCAL SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
D.Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command CREATE SYNONYM EDL_VU ON mary(EMP_DEPT_LOC_VU); then he can prefix the columns with this synonym.
E.Scott cannot create a synonym because synonyms can be created only for tables.
F.Scott cannot create any synonym for Mary's view. Mary should create a private synonym for the view and grant SELECT privilege on that synonym to Scott.

5.多项选择题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.

7.多项选择题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

8.单项选择题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);

9.多项选择题

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

10.单项选择题

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

最新试题

Which view should a user query to display the columns associated with the constraints on a table owned by the user? ()

题型:单项选择题

Which two statements about subqueries are true? ()

题型:多项选择题

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

题型:单项选择题

Which four are types of functions available in SQL? ()

题型:多项选择题

Which three are true? ()

题型:多项选择题

Which object privileges can be granted on a view? ()

题型:单项选择题

You need to design a student registration database that contains several tables storing academic information.The STUDENTS table stores information about a student. The STUDENT_GRADES table storesinformation about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key.You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table thatpoints to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?()

题型:单项选择题

What is true regarding subqueries?()

题型:单项选择题

Which two statements about subqueries are true? ()

题型:多项选择题

Examine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER NOT NULL, Primary KeyEMP_NAME VARCHAR2(30)JOB_ID NUMBER\SAL NUMBERMGR_ID NUMBER References EMPLOYEE_ID columnDEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You created a sequence called EMP_ID_SEQ inorderto populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table. Which two statements regarding the EMP_ID_SEQ sequence are true? ()

题型:多项选择题