Re: CREATE VIEW with * and other stuff?

From: <uday.ketkar_at_dscoe.com>
Date: 1998/03/16
Message-ID: <6eka6d$4s0$1_at_nnrp1.dejanews.com>#1/1


Hi,

Yes! There is a simple way to do what you are looking for. Also you are very close to the solution.

Things what you have to modify are :
1) Instead * you have to specify all columns individually. 2) After a computed column provide an alias.

like -

CREATE VIEW TEST_VIEW AS
  SELECT A,B,C,A+B Alias1, SUBSTR(C,1,1) Alias2 FROM TEST;

Hope this will help you.
-Uday P. Ketkar.


In article <3503425a.39212654_at_news.mindspring.com>,   derman_at_mindspring.com (Jon Derman) wrote:
>
> Given that one can create a view of a table with something like this:
>
> CREATE VIEW TEST_VIEW AS
> SELECT * FROM TEST;
>
> ...is there a simple way to create a view that contains everything in
> a given table -- plus a couple of other things (calculated things, for
> example) -- without having to list everything out? Something like
> this:
>
> CREATE VIEW TEST_VIEW AS
> SELECT *, A+B, SUBSTR(C,1,1) FROM TEST;
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Mon Mar 16 1998 - 00:00:00 CET

Original text of this message