diff options
author | pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se <> | 2005-08-20 16:38:55 -0400 |
---|---|---|
committer | pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se <> | 2005-08-20 16:38:55 -0400 |
commit | 4084c13605a7c3a1307882f65de7527b7ed47add (patch) | |
tree | b1d89aa88573d321fecce3d621fab7eea24781c1 /mysql-test/r/distinct.result | |
parent | 9a3168da82c89ebdf5b864b847c8b8938387e5f9 (diff) | |
parent | 5340e046618ca893450fb519dc06c87c4b9a068c (diff) | |
download | mariadb-git-4084c13605a7c3a1307882f65de7527b7ed47add.tar.gz |
Merge c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-4.1
into c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0
Diffstat (limited to 'mysql-test/r/distinct.result')
-rw-r--r-- | mysql-test/r/distinct.result | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 3ad2b73f1d3..00436019f85 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -464,6 +464,46 @@ SELECT DISTINCT html,SUM(rout)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin; html prod 1 0.0000 drop table t1; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +SELECT DISTINCT a, 1 FROM t1; +a 1 +1 1 +2 1 +3 1 +4 1 +5 1 +SELECT DISTINCT 1, a FROM t1; +1 a +1 1 +1 2 +1 3 +1 4 +1 5 +CREATE TABLE t2 (a int, b int); +INSERT INTO t2 VALUES (1,1),(2,2),(2,3),(2,4),(3,5); +SELECT DISTINCT a, b, 2 FROM t2; +a b 2 +1 1 2 +2 2 2 +2 3 2 +2 4 2 +3 5 2 +SELECT DISTINCT 2, a, b FROM t2; +2 a b +2 1 1 +2 2 2 +2 2 3 +2 2 4 +2 3 5 +SELECT DISTINCT a, 2, b FROM t2; +a 2 b +1 2 1 +2 2 2 +2 2 3 +2 2 4 +3 2 5 +DROP TABLE t1,t2; create table t1 (id int, dsc varchar(50)); insert into t1 values (1, "line number one"), (2, "line number two"), (3, "line number three"); select distinct id, IFNULL(dsc, '-') from t1; |