[reporter="jhyde", created="Wed, 13 Dec 2006 18:47:02 -0500 (GMT-05:00)"]
CREATE VIEW should give error if query's column names are not unique.
SQL:2003 Part 2 Section 11.2 Syntax Rule 12:
"12) If any two columns in the table specified by the
have equivalent s, or
if any column of that table has an implementation-dependent name,
then a shall be
specified."
So,
CREATE VIEW v AS SELECT empno, empno FROM emp;
should be illegal, and
CREATE VIEW v AS SELECT upper(empno), lower(deptno) FROM emp
should also be illegal (instead of using EXPR$0 and EXPR$1).
[reporter="jhyde", created="Wed, 13 Dec 2006 18:47:02 -0500 (GMT-05:00)"] CREATE VIEW should give error if query's column names are not unique.
s, or shall be
SQL:2003 Part 2 Section 11.2 Syntax Rule 12:
"12) If any two columns in the table specified by the
have equivalent
if any column of that table has an implementation-dependent name,
then a
specified."
So,
CREATE VIEW v AS SELECT empno, empno FROM emp;
should be illegal, and
CREATE VIEW v AS SELECT upper(empno), lower(deptno) FROM emp
should also be illegal (instead of using EXPR$0 and EXPR$1).