阅读背景:

JOIN中的MySQL错误限制 - 查询更改记录中的值

来源:互联网 

in the following scenario:

在以下场景中:

CREATE TABLE `table1` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `text1` varchar(29) NOT NULL,
  `flag` bit(1) DEFAULT NULL,
  `reference` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE ,
  UNIQUE KEY `idx_text` (`text1`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `table1` (id, text1, flag, reference) VALUES
(31486, 'YWXH-D6N4-XXH6', 0, NULL), 
(31487, 'CBH0-UJBC-MFTO', 0, NULL), 
(31488, 'FRQM-E6MW-6VFE', 1, 1657), 
(31489, 'LZOS-EYDT-1BBF', 0, NULL), 
(31490, 'D1XQ-YKAX-XQRC', 0, NULL);

CREATE TABLE `table2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `value1` int(11) NOT NULL,
  `value2` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `value1` (`value1`),
  KEY `value2` (`value2`)
) ENGINE=MyISAM AUTO_INCREMENT=20068 DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED;

INSERT INTO table2 (id, value1, value2) VALUES
(1657, 1891, 1748);

-- the tables are shortened from "real" tables, i used SHOW CREATE <table> to create this script.
CREATE T



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: