Which two statements are true regarding views? (Choose two.)
A.
A sub query that defines a view cannot include the GROUP BY clause
B.
A view is created with the sub query having the DISTINCT keyword can be updated
C.
A Data Manipulation Language (DML) operation can be performed on a view that is
created with the sub query having all the NOT NULL columns of a table
D.
A view that is created with the sub query having the pseudo column ROWNUM keyword
cannot be updated
i guess c not a true answer
you guessed it wrong ,correct answer is c and d
try this..
CREATE TABLE employee (
emplid number primary key,
name varchar2(10),
lastname varchar2(10)
);
create view emp_view as select * from employee;
insert into employee values (‘1′,’test’,’test’);
insert into emp_view values (‘1′,’test’,’test’);
– take note theres no not null in column employee.
create view emp_view as select distinct * from employee;
insert into emp_view values (‘2′,’june’,’balaga’);
please let me know your thoughts on this.
B should be true, no?
CREATE TABLE employee (
emplid number primary key,
name varchar2(10),
lastname varchar2(10)
);
create view emp_view as select * from employee;
insert into employee values (1,’test’,’test’);
insert into emp_view values (1,’test’,’test’);
/** take note theres no not null in column employee.*/
drop view emp_view
create view emp_view as select distinct * from employee;
select * from emp_view
insert into emp_view values (‘2′,’june’,’balaga’);
update emp_view set NAME = name || ‘_oi’;
Bad question!