mysql临时表的使用
创始人
2025-07-09 12:24:37
0

mysql临时表是session级的,在连接mysql期间存在,断开连接自动删除临时表。


创建临时表:

create temporary table table1(id int not null auto_increment,name varchar(10),age int(11),money decimal(10,2),primary key(id))ENGINE=InnoDB DEFAULT CHARSET=utf8


注:ENGINE为设置数据库引擎,数据库引擎主要有InnoDB、MyISAM。


清空临时表数据:

truncate table table1


手动删除临时表

drop table table1


其他操作同普通表

相关内容

热门资讯

vcenter因证书问题无法上... 解决方法:导入root CA证书。主要操作步骤如下:1、下载root CA证书,并解压。2、右击5a...
redis出现报错:Error... 问题:redis出现报错:Error: 磁盘在使用中,或被另一个进程锁定解决方法1、在配置文件中修改...
redis常用操作 设置密码:config set requirepass 123 //123为密码密码验证:auth...
centos7 LVM(逻辑卷... 一、LVM简介 LVM是 Logical Volume Manager(逻辑卷管理)的简写,它...
centos7支持中文 1、使用locale命令查看当前使用的语言2、使用locale -a 查看安装的语言包,如果没有中文...
mysql查看和修改字符集 查看数据库的字符集:show create database 数据库名;修改数据库的字符集:alte...
mariadb galera ... mariadb server下载地址:https://mariadb.org/download/?...
mariadb galera ... mariadb server下载地址:https://mariadb.org/download/?...
mysql数据库导入导出 导出mysqldump --default-character-set=utf8 -u用户名 -p密...
nginx配置实例:只允许内部... #配置清单location / { deny 192.168.1.1; ...