mysql5和mysql5.5创建内存表的不同
2012-06-02 22:13
162 查看
老的需要注明:
type=heap;
mysql5.5需要注明:
engine=HEAP;
例子:
DROP TABLE IF EXISTS jrun_sessions;
CREATE TABLE jrun_sessions (
sid char(6) binary NOT NULL DEFAULT '',
ip1 tinyint(3) unsigned NOT NULL DEFAULT '0',
ip2 tinyint(3) unsigned NOT NULL DEFAULT '0',
ip3 tinyint(3) unsigned NOT NULL DEFAULT '0',
ip4 tinyint(3) unsigned NOT NULL DEFAULT '0',
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
username char(15) NOT NULL DEFAULT '',
groupid smallint(6) unsigned NOT NULL DEFAULT '0',
styleid smallint(6) unsigned NOT NULL DEFAULT '0',
invisible tinyint(1) NOT NULL DEFAULT '0',
`action` tinyint(1) unsigned NOT NULL DEFAULT '0',
lastactivity int(10) unsigned NOT NULL DEFAULT '0',
lastolupdate int(10) unsigned NOT NULL DEFAULT '0',
pageviews smallint(6) unsigned NOT NULL DEFAULT '0',
seccode mediumint(6) unsigned NOT NULL DEFAULT '0',
fid smallint(6) unsigned NOT NULL DEFAULT '0',
tid mediumint(8) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY sid (sid),
KEY uid (uid),
KEY invisible (invisible)
) engine=HEAP;
type=heap;
mysql5.5需要注明:
engine=HEAP;
例子:
DROP TABLE IF EXISTS jrun_sessions;
CREATE TABLE jrun_sessions (
sid char(6) binary NOT NULL DEFAULT '',
ip1 tinyint(3) unsigned NOT NULL DEFAULT '0',
ip2 tinyint(3) unsigned NOT NULL DEFAULT '0',
ip3 tinyint(3) unsigned NOT NULL DEFAULT '0',
ip4 tinyint(3) unsigned NOT NULL DEFAULT '0',
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
username char(15) NOT NULL DEFAULT '',
groupid smallint(6) unsigned NOT NULL DEFAULT '0',
styleid smallint(6) unsigned NOT NULL DEFAULT '0',
invisible tinyint(1) NOT NULL DEFAULT '0',
`action` tinyint(1) unsigned NOT NULL DEFAULT '0',
lastactivity int(10) unsigned NOT NULL DEFAULT '0',
lastolupdate int(10) unsigned NOT NULL DEFAULT '0',
pageviews smallint(6) unsigned NOT NULL DEFAULT '0',
seccode mediumint(6) unsigned NOT NULL DEFAULT '0',
fid smallint(6) unsigned NOT NULL DEFAULT '0',
tid mediumint(8) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY sid (sid),
KEY uid (uid),
KEY invisible (invisible)
) engine=HEAP;
相关文章推荐
- MySQL 5.5 创建 线性Hash分区表,并将表文件分布到不同的物理磁盘上
- hibernate mysql5.5.X 不能创建表
- Mysql5升级到Mysql5.5的方法
- mysql5.7和mysql5.5在空值查询上的不同
- mysql5.5基础 show create table...\G 查看创建表时候用的SQL语句
- mysql创建内存表的方法
- Linux下两个不同版本Mysql的安装实战(Mysql5和mysql4)
- jpa在mysql中自动创建重复表,只是大小写不同
- 用内存申请实现动态二维数组的创建及打印(每行的元素个数不同)
- Mysql5.1与Mysql5.5指定选项参数的不同
- mysql5.5 无法创建实例,error 16001
- mysql5.5基础 create table... 在指定数据库创建一个表
- mysql 临时表和内存表创建 查询 删除以及注意事项
- mysql5.6与mysql5.5不同
- 《MYSQL 5.5从零开始学》——创建数据库
- mysql5.6与mysql5.5不同
- [置顶] Lucene 4.10 + Mysql 5.5 创建数据库表索引(Lucene 学习序列1)
- mysql 临时表和内存表创建 查询 删除以及注意事项
- Hibernate和Mysql5.5创建表出错——type=InnDB/schema export unsuccessful
- mysql5.5分别把这两个数据库同步到不同的从服务器