954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Creating View with a condition

Hello.

I've got an exaple data base for hr account from Oracle.
My goal is to create a view which contains empno,ename and deptno from EMP, but than i can only add rows with condition deptno=20.

I've cameup with

create or replace view d20emp as
select 
empno as num, 
ename as name, 
deptno as department 
from emp where deptno=20;


Any ideas how to add this cinde of condition ?

hatebin
Light Poster
25 posts since Jul 2011
Reputation Points: 9
Solved Threads: 0
 

Your code is perfectly fine.

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You