Consider the following sample data:

create table a (c1 integer, c2 integer);
create table b (c3 integer, c4 integer);

insert into a values (1,1), (2,2);
insert into b values (3,3), (4,4);

with a(col1, col3) as (
  select c3, c3 + 42
  from b
)
select *
from a;


The above returns 

C1 | C2
---+---
 1 |  1
 2 |  2

Which is wrong as the name of the CTE should have "priority" over the 
table, and the final SELECT should return the result of the CTE not the 
content of table a

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to