SQL Server和MySql中创建临时表
作者:Ystar灬龙子 来源:CSSLong 时间:2008-06-19 13:31:00
SQL Server创建临时表:
创建临时表
方法一:
create table #临时表名(字段1 约束条件,
字段2 约束条件,
.....)
create table ##临时表名(字段1 约束条件,
字段2 约束条件,
.....)
方法二:
select * into #临时表名 from 你的表;
select * into ##临时表名 from 你的表;
注:以上的#代表局部临时表,##代表全局临时表
查询临时表
select * from #临时表名;
select * from ##临时表名;
删除临时表
drop table #临时表名;
drop table ##临时表名;
Mysql创建临时表
创建临时表
create temporary table 临时表名(字段1 约束条件,
字段2 约束条件,
.....)
查询临时表
select * from 临时表名
删除临时表
drop table 临时表名
关于MySql创建临时表,在Mysql命令端可以成功创建临时表,但是我在PHPMyadmin中一直创建不成功,很是郁闷....
标签:sql,sql,server,mysql,表
0
投稿
猜你喜欢
PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
2023-11-14 16:13:53
Python中模拟enum枚举类型的5种方法分享
2022-05-04 01:00:10
python去重,一个由dict组成的list的去重示例
2023-09-26 03:54:44
Python搜索引擎实现原理和方法
2023-06-26 05:35:32
在element-ui的select下拉框加上滚动加载
2024-04-17 10:04:14
基于go+vue实现的golang每日新闻数据浏览与检索平台(推荐)
2023-06-16 12:11:26
浅谈web分析
2008-12-02 15:52:00
Python基于随机采样一至性实现拟合椭圆(优化版)
2021-10-19 15:08:36
教你轻松掌握如何正确的修复Access数据库
2008-11-28 16:21:00
有啊在设计上相对淘宝的优势
2009-05-22 12:28:00
基于Python编写一个B站全自动抽奖的小程序
2021-05-03 02:11:07
TensorFlow人工智能学习数据合并分割统计示例详解
2022-01-23 05:14:23
Vue 自定义指令实现一键 Copy功能
2024-05-05 09:08:48
Django contrib auth authenticate函数源码解析
2022-04-27 01:49:23
解决jupyter notebook图片显示模糊和保存清晰图片的操作
2022-08-20 12:53:59
Windows Server2008 R2 MVC 环境安装配置教程
2024-01-17 06:45:24
Python argparse模块应用实例解析
2023-08-29 12:44:52
MySQL连接时出现2003错误的实现
2024-01-22 17:17:30
Python三维绘图之Matplotlib库的使用方法
2023-01-22 02:02:04
python FTP批量下载/删除/上传实例
2022-11-21 15:27:59