| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Column name in view
"--CELKO--" <71062.1056_at_compuserve.com> wrote in message
news:c0d87ec0.0211091607.2d38b63f_at_posting.google.com...
> Put the column names into the VIEW declaration header, not the body of the
view.
>
> CREATE VIEW Foobar (id, name, study)
> AS SELECT a.studend_id, a.student_name, b.course_study
> FROM view1 AS a, View2 AS b
> WHERE a.student_id = b.student_id;
I think that the SELECT statement that K.Y. posted was going against the view, so it wasn't the view definition itself. I might have misunderstood of course.
Btw, I checked one of my SQL-99 books (*) which states that the column names that the view exposes should be that is the query in the view (if the column name list is omitted). So, if the SELECT statement indeed was the view definition, I'd say that the behavior is not ANSI SQL compliant. ((*) Gulutzan's and Perlzer's book - I had a few beer to many yesterday to read the ANSI docs right now. <g>)
Another possibility is that K.Y. is using some query tool which tries to "help" by using some meta-data and exposes "where the data comes from" with the column names.
-- Tibor KarasziReceived on Sun Nov 10 2002 - 04:00:59 CST
![]() |
![]() |