Вы находитесь на странице: 1из 3

SQL> conn hr/hr

Connected.
SQL>
SQL>
SQL>
SQL> create view v_ema as select employee_id, first_name from employees;
View created.
SQL>
2
3
4
5

create force view vu_force


as
select employee_id,first_name
from empy
;

Warning: View created with compilation errors.


SQL> select view_name,text from user_views
2 where view_name='VU_FORCE';
VIEW_NAME TEXT
---------- ------------------------------------------------------------------------------VU_FORCE select employee_id,first_name
from empy
SQL> select object_name,status from user_objects where object_name='VU_FORCE';
OBJECT_NAME
----------------------------------------------------------------------------------------------------------------------STATUS
------VU_FORCE
INVALID
SQL>
2
3
SQL>
2
3
4
5

create table empy


(
.
create table empy
as
select employee_id,first_name
from employees
where department_id<=50;

Table created.
SQL> select * from vu_force;
EMPLOYEE_ID
----------198
199
200
201
202
203

FIRST_NAME
-------------------Donald
Douglas
Jennifer
Michael
Pat
Susan

114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

Den
Alexander
Shelli
Sigal
Guy
Karen
Matthew
Adam
Payam
Shanta
Kevin
Julia
Irene
James
Steven
Laura
Mozhe
James
TJ
Jason
Michael
Ki
Hazel
Renske
Stephen
John
Joshua
Trenna
Curtis
Randall
Peter
Winston
Jean
Martha
Girard
Nandita
Alexis
Julia
Anthony
Kelly
Jennifer
Timothy
Randall
Sarah
Britney
Samuel
Vance
Alana
Kevin

55 rows selected.
SQL> select object_name,status from user_objects where object_name='VU_FORCE';
OBJECT_NAME
----------------------------------------------------------------------------------------------------------------------STATUS
------VU_FORCE

VALID

Вам также может понравиться