2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(1,2,3)=ROW(1,2,3);
|
|
|
|
ROW(1,2,3)=ROW(1,2,3)
|
2002-11-15 20:32:09 +02:00
|
|
|
1
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(2,2,3)=ROW(1+1,2,3);
|
|
|
|
ROW(2,2,3)=ROW(1+1,2,3)
|
2002-11-15 20:32:09 +02:00
|
|
|
1
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(1,2,3)=ROW(1+1,2,3);
|
|
|
|
ROW(1,2,3)=ROW(1+1,2,3)
|
2002-11-15 20:32:09 +02:00
|
|
|
0
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(1,2,3)<ROW(1+1,2,3);
|
|
|
|
ROW(1,2,3)<ROW(1+1,2,3)
|
2002-11-15 20:32:09 +02:00
|
|
|
1
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(1,2,3)>ROW(1+1,2,3);
|
|
|
|
ROW(1,2,3)>ROW(1+1,2,3)
|
2002-11-15 20:32:09 +02:00
|
|
|
0
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(1,2,3)<=ROW(1+1,2,3);
|
|
|
|
ROW(1,2,3)<=ROW(1+1,2,3)
|
2002-11-15 20:32:09 +02:00
|
|
|
1
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(1,2,3)>=ROW(1+1,2,3);
|
|
|
|
ROW(1,2,3)>=ROW(1+1,2,3)
|
2002-11-15 20:32:09 +02:00
|
|
|
0
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(1,2,3)<>ROW(1+1,2,3);
|
|
|
|
ROW(1,2,3)<>ROW(1+1,2,3)
|
2002-11-15 20:32:09 +02:00
|
|
|
1
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(NULL,2,3)=ROW(NULL,2,3);
|
|
|
|
ROW(NULL,2,3)=ROW(NULL,2,3)
|
2002-11-28 09:11:35 +02:00
|
|
|
NULL
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(NULL,2,3)<=>ROW(NULL,2,3);
|
|
|
|
ROW(NULL,2,3)<=>ROW(NULL,2,3)
|
2002-11-28 09:11:35 +02:00
|
|
|
1
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW(1,2,ROW(3,4,5))=ROW(1,2,ROW(3,4,5));
|
|
|
|
ROW(1,2,ROW(3,4,5))=ROW(1,2,ROW(3,4,5))
|
2002-11-15 20:32:09 +02:00
|
|
|
1
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW('test',2,3.33)=ROW('test',2,3.33);
|
|
|
|
ROW('test',2,3.33)=ROW('test',2,3.33)
|
2002-11-15 20:32:09 +02:00
|
|
|
1
|
2002-11-30 19:33:01 +01:00
|
|
|
SELECT ROW('test',2,3.33)=ROW('test',2,3.33,4);
|
2002-11-29 12:30:04 +02:00
|
|
|
Cardinality error (more/less than 3 columns)
|
2002-11-15 20:32:09 +02:00
|
|
|
drop table if exists t1;
|
|
|
|
create table t1 ( a int, b int, c int);
|
|
|
|
insert into t1 values (1,2,3), (2,3,1), (3,2,1);
|
2002-11-30 19:33:01 +01:00
|
|
|
select * from t1 where ROW(1,2,3)=ROW(a,b,c);
|
2002-11-15 20:32:09 +02:00
|
|
|
a b c
|
|
|
|
1 2 3
|
2002-11-30 19:33:01 +01:00
|
|
|
select * from t1 where ROW(0,2,3)=ROW(a,b,c);
|
2002-11-15 20:32:09 +02:00
|
|
|
a b c
|
2002-11-30 19:33:01 +01:00
|
|
|
select * from t1 where ROW(1,2,3)<ROW(a,b,c);
|
2002-11-15 20:32:09 +02:00
|
|
|
a b c
|
|
|
|
2 3 1
|
|
|
|
3 2 1
|
|
|
|
drop table t1;
|
2002-11-30 19:33:01 +01:00
|
|
|
select ROW(1,1);
|
2002-11-29 12:30:04 +02:00
|
|
|
Cardinality error (more/less than 1 columns)
|
|
|
|
drop table if exists t1;
|
|
|
|
create table t1 (i int);
|
2002-11-30 19:33:01 +01:00
|
|
|
select 1 from t1 where ROW(1,1);
|
2002-11-29 12:30:04 +02:00
|
|
|
Cardinality error (more/less than 1 columns)
|
2002-11-30 19:33:01 +01:00
|
|
|
select count(*) from t1 order by ROW(1,1);
|
2002-11-29 12:30:04 +02:00
|
|
|
Cardinality error (more/less than 1 columns)
|
|
|
|
drop table t1;
|