码迷,mamicode.com
首页 > 数据库 > 详细

Mysql MERGE引擎简介

时间:2017-08-04 19:41:43      阅读:200      评论:0      收藏:0      [点我收藏+]

标签:简介   null   myisam   charset   sql   nio   ast   method   引擎   

CREATE TABLE `test0` (
`uin` int(10) unsigned NOT NULL,
`data` text NOT NULL,
`modtime` int(10) unsigned NOT NULL,
PRIMARY KEY (`uin`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `test1` (
`uin` int(10) unsigned NOT NULL,
`data` text NOT NULL,
`modtime` int(10) unsigned NOT NULL,
PRIMARY KEY (`uin`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


CREATE TABLE `test` (
`uin` int(10) unsigned NOT NULL,
`data` text NOT NULL,
`modtime` int(10) unsigned NOT NULL,
PRIMARY KEY (`uin`)
) ENGINE=merge CHARSET=latin1 UNION=(`test0`,`test1`) INSERT_METHOD=LAST;

INSERT INTO test0 (uin,`data`,modtime) VALUE (3,‘test3333333‘,‘3‘);

INSERT INTO test1 (uin,`data`,modtime) VALUE (2,‘test2222222‘,‘2‘);
INSERT INTO test1 (uin,`data`,modtime) VALUE (2,‘test1111111‘,‘2‘);


SELECT * from test;

Mysql MERGE引擎简介

标签:简介   null   myisam   charset   sql   nio   ast   method   引擎   

原文地址:http://www.cnblogs.com/xiamibk/p/7286537.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!