📄 que_028.htm
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>Ocp test </title>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p align="left" color="black" style="font-size:16pt;">
<b>QUESTION 028
</b></p><hr color="#99CCFF">
<p>You created a view called EMP_DEPT_VU that contains three columns from the
EMPLOYEES and DEPARTMENTS tables:
<br>EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME.
<br><br>The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the
primary key DEPARTMENT_ID column of the DEPARTMENTS table.
You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER
data type from the EMPLOYEES tables.
How can you accomplish this task? </p><table border="1" bordercolor="gray" width="665">
<form name="youAnsForm">
<span style="font-size:18pt;">
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="A"> A.</b></p>
</td>
<td align="left" width="566">
<p> ALTER VIEW emp_dept_vu (ADD manager_id NUMBER);
</p>
</td>
</tr>
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="B"> B.</b></p>
</td>
<td align="left" width="566">
<p> MODIFY VIEW emp_dept_vu (ADD manager_id NUMBER);
</p>
</td>
</tr>
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="C"> C.</b></p>
</td>
<td align="left" width="566">
<p> ALTER VIEW emp_dept_vu AS <br>
SELECT employee_id, employee_name, <br>
department_name, manager_id <br>
FROM employee e, departments d <br>
WHERE e.department_id = d.department_id;
</p>
</td>
</tr>
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="D"> D.</b></p>
</td>
<td align="left" width="566">
<p> MODIFY VIEW emp_dept_vu AS <br>
SELECT employee_id, employee_name, <br>
department_name, manager_id <br>
FROM employees e, departments d <br>
WHERE e.department_id = d.department_id;
</p>
</td>
</tr>
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="E"> E.</b></p>
</td>
<td align="left" width="566">
<p> CREATE OR REPLACE VIEW emp_dept_vu AS <br>
SELECT employee_id, employee_name, <br>
department_name, manager_id <br>
FROM employees e, departments d <br>
WHERE e.department_id = d.department_id;
</p>
</td>
</tr>
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="F"> F.</b></p>
</td>
<td align="left" width="566">
<p> You must remove the existing view first, and then run the CREATE VIEW command
with a new column list to modify a view.</p>
</td>
</tr>
</span>
</form>
</table>
<br></body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -