diff options
author | unknown <monty@narttu.mysql.fi> | 2003-03-10 13:54:20 +0200 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-03-10 13:54:20 +0200 |
commit | 5c100a6975cb50a6e20e6a0380bfb616e54eab70 (patch) | |
tree | c4dd436c27f0afcb40a0c5a50508515617f5552c /mysql-test/r/join.result | |
parent | 012ffb5d505cc563ae980bd8cbee9b668f517cac (diff) | |
download | mariadb-git-5c100a6975cb50a6e20e6a0380bfb616e54eab70.tar.gz |
after merge fixes
Diffstat (limited to 'mysql-test/r/join.result')
-rw-r--r-- | mysql-test/r/join.result | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index d8c45ca09ce..9f6a8762325 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -251,7 +251,26 @@ t1_id t2_id type cost_unit min_value max_value t3_id item_id id name 22 1 Percent Cost 100 -1 6 291 1 s1 23 1 Percent Cost 100 -1 21 291 1 s1 drop table t1,t2; +CREATE TABLE t1 ( +siteid varchar(25) NOT NULL default '', +emp_id varchar(30) NOT NULL default '', +rate_code varchar(10) default NULL, +UNIQUE KEY site_emp (siteid,emp_id), +KEY siteid (siteid) +) TYPE=MyISAM; +INSERT INTO t1 VALUES ('rivercats','psmith','cust'), ('rivercats','KWalker','cust'); +CREATE TABLE t2 ( +siteid varchar(25) NOT NULL default '', +rate_code varchar(10) NOT NULL default '', +base_rate float NOT NULL default '0', +PRIMARY KEY (siteid,rate_code), +FULLTEXT KEY rate_code (rate_code) +) TYPE=MyISAM; +INSERT INTO t2 VALUES ('rivercats','cust',20); +SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND lr.siteid = 'rivercats'; rate_code base_rate cust 20 +SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith'; rate_code base_rate cust 20 +drop table t1,t2; |