dynamobi/dynamobi — Issue #629: [FRG-243] CREATE VIEW should give error if query's column names are not unique
Author: dynamobi-build
Created: 2011-12-30 03:39:28+00:00
State: open
Labels: FRG

[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).