Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Is it possible for me to create such a view?

Is it possible for me to create such a view?

From: Johnson Chao <zjx110_at_my-dejanews.com>
Date: Wed, 07 Apr 1999 00:49:58 GMT
Message-ID: <7eea3k$u66$1@nnrp1.dejanews.com>

Hi:
  I am just beginnin to learn sql and oracle.   I am now having two tables:

  1. create table z1(z1_c1 number,z1_c2 number)
  2. create table z2(z2_c1 number)

 In z1:
 1 90
 2 150
 3 200

 In z2:
 2
 7
 8
 9

 I am now trying to create a view from z1 whose second column's value is decided by some conditions.

  1. create a view z1_view1 whose second column's value is TRUE if z1's second column's valuse is less then 100, else FALSE. In my case, the out put should be: z1_view1: 1 TRUE 2 FALSE 3 FALSE
  2. create a view z1_view2 whose second column's value is TRUE if z1's first column's value exists in z2, else FALSE. In my case, the output should be: 1 FALSE 2 TRUE 3 FALSE
How can I do that? Any help will be greatly appreciated.

Johnson Chao
ctc Japan

Johnson Chao
ctc Japan

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Apr 06 1999 - 19:49:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US