home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / key_diff.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  496 b   |  20 lines  |  [TEXT/ttxt]

  1. #
  2. # Check on condition on different length keys.
  3.  
  4. drop table if exists t1;
  5. CREATE TABLE t1 (
  6.   a char(5) NOT NULL,
  7.   b char(4) NOT NULL,
  8.   KEY (a),
  9.   KEY (b)
  10. );
  11.  
  12. INSERT INTO t1 VALUES ('A','B'),('b','A'),('C','c'),('D','E'),('a','a');
  13.  
  14. select * from t1,t1 as t2;
  15. explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
  16. #select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
  17. select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
  18. select * from t1 where a='a';
  19. drop table t1;
  20.