summaryrefslogtreecommitdiff
path: root/mysql-test/r/join.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/join.result')
-rw-r--r--mysql-test/r/join.result30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index ff608825b9c..ddea0ac1a57 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -1,4 +1,34 @@
drop table if exists t1,t2,t3;
+CREATE TABLE t1 (S1 INT);
+CREATE TABLE t2 (S1 INT);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+SELECT * FROM t1 JOIN t2;
+S1 S1
+1 2
+SELECT * FROM t1 INNER JOIN t2;
+S1 S1
+1 2
+SELECT * from t1 JOIN t2 USING (S1);
+S1 S1
+SELECT * FROM t1 INNER JOIN t2 USING (S1);
+S1 S1
+SELECT * from t1 CROSS JOIN t2;
+S1 S1
+1 2
+SELECT * from t1 LEFT JOIN t2 USING(S1);
+S1 S1
+1 NULL
+SELECT * from t1 LEFT JOIN t2 ON(t2.S1=2);
+S1 S1
+1 2
+SELECT * from t1 RIGHT JOIN t2 USING(S1);
+S1 S1
+NULL 2
+SELECT * from t1 RIGHT JOIN t2 ON(t1.S1=1);
+S1 S1
+1 2
+drop table t1,t2;
create table t1 (id int primary key);
create table t2 (id int);
insert into t1 values (75);