You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (3);
-- ok
SQL> select a.*
CON> from t1 a
CON> where a.rdb$db_key = (
CON> select b.rdb$db_key
CON> from t1 b
CON> where n = 1
CON> );
N
============
1
-- ok
SQL> create view v1 as
CON> select a.*
CON> from t1 a
CON> where a.rdb$db_key = (
CON> select b.rdb$db_key
CON> from t1 b
CON> where n = 1
CON> );
SQL>
-- ok
SQL> select * from v1;
N
============
1
-- wrong: returns nothing
SQL> select * from v1 union all select * from v1;
Submitted by: @asfernandes
Is related to QA365
create table t1 (n integer);
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (3);
-- ok
SQL> select a.*
CON> from t1 a
CON> where a.rdb$db_key = (
CON> select b.rdb$db_key
CON> from t1 b
CON> where n = 1
CON> );
============
1
-- ok
SQL> create view v1 as
CON> select a.*
CON> from t1 a
CON> where a.rdb$db_key = (
CON> select b.rdb$db_key
CON> from t1 b
CON> where n = 1
CON> );
SQL>
-- ok
SQL> select * from v1;
============
1
-- wrong: returns nothing
SQL> select * from v1 union all select * from v1;
Commits: 50ab76f
The text was updated successfully, but these errors were encountered: