惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
雷峰网
雷峰网
S
Securelist
V
Vulnerabilities – Threatpost
S
SegmentFault 最新的问题
T
The Exploit Database - CXSecurity.com
A
About on SuperTechFans
T
Threat Research - Cisco Blogs
Attack and Defense Labs
Attack and Defense Labs
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
V2EX
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
L
Lohrmann on Cybersecurity
S
Security Affairs
S
Secure Thoughts
P
Privacy & Cybersecurity Law Blog
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cisco Talos Blog
Cisco Talos Blog
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
H
Heimdal Security Blog
L
LINUX DO - 热门话题
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
D
DataBreaches.Net
N
Netflix TechBlog - Medium
The Hacker News
The Hacker News
N
News and Events Feed by Topic
C
Check Point Blog
博客园_首页
Scott Helme
Scott Helme
T
Troy Hunt's Blog
U
Unit 42

博客园 - e旋风

异常码汇总 搬家公司管理系统,能完成车辆管理、订单管理等工作,并给出报表统计数据 Win7系统上华为无线上网卡与VMware冲突导致驱动无法正常安装的解决办法 VMware 中禁用虚拟内存加速虚拟机速度 Thread & ThreadPool 的一些背景知识 - e旋风 [转]WinForm数据绑定--BindingContext C#中字符数与字节数的区别 - e旋风 - 博客园 世联地产软件工程师笔试试题 HttpRuntime.Cache 与HttpContext.Current.Cache的疑问 配置节处理程序声明 - e旋风 - 博客园 判断是否存在在父结果集中有而在子结果集中没有的记录的最佳方法 定义局部变量时,字符串不能超过8000的方法 我搜集的关于工作流方面的技术文章 注意Transact-SQL中Case函数的两种用法导致不同的结果集 只有设置为InProc,Session失效时才会触发Session_End asp.net用户控件中使用相对路径问题 a href=#与 a href=javascript:void(0) 的区别 打开新窗口链接的几种办法 只能输入汉字,数字,英文大小写,符号只允许,。!的正则表达式 HTML及XML语言的转义字符
动态执行Sql语句与临时表的问题(对象名无效)
e旋风 · 2006-10-18 · via 博客园 - e旋风

exec('selectIDENTITY(int,1,1)  as ID,fnum,into  #yuecu  from  store_store where  '+@Parameter)  
select  XX,XX1,XX2  from  #yuecu 
.  
这样创建一个临时表以后我再想从临时表中取数据提示对象名#yuecu 无效,晕,如果我不是使用exec()执行sql语句的话就没有任何问题,WHY?  

临时表有作用域的,上面的临时表只在EXEC內部有效。

解决办法:

改用全局临时表

exec('selectIDENTITY(int,1,1)  as ID,fnum,into  ##yuecu  from  store_store where  '+@Parameter)  

select * from  ##yuecu