Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: column as select ?
Isma wrote:
>
> Hi,
> 1/ I want to know if a column in TABLE1 can be the result of a select blaba
> from TABLE2 if this query returns one result ...
> 2 / Is this possible to add this column in a predetermined place in TABLE1
> in ORACLE ?
>
> Thanks ..
1/ Yes, e.g.:
SELECT *, (SELECT * FROM DUAL) AS c2, FROM DUAL
2/ Yes, e.g.,
INSERT INTO z (c1,c2,c3)
SELECT x.c1, x.c2, (SELECT y.c1 FROM Y WHERE ...) AS c3
or, alternately,
CREATE OR REPLACE VIEW Z
SELECT x.c1, x.c2, (SELECT y.c1 FROM Y WHERE ...) AS c3Received on Sat Dec 22 2001 - 07:18:16 CST