Re: CREATE VIEW with * and other stuff?

From: tzadkiel <tzadkiel_at_surfnetcity.com.au>
Date: 1998/03/09
Message-ID: <01bd4b32$337b2b80$57ce6ccb_at_default>#1/1


yes, in the same way you can use "*" to get all the fields of one table in a table join: prefix it with the table name/alias.

create view x as
select test.*, a+b ab, substr(c,1,3) prefix_c from test

Jon Derman <derman_at_mindspring.com> wrote in article <3503425a.39212654_at_news.mindspring.com>...
> 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;
>
Received on Mon Mar 09 1998 - 00:00:00 CET

Original text of this message