首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

简略sql疑问

2012-09-17 
简单sql疑问select * into a from (select * from b) as temp where 10想复制一个b表的表结构,上面的写法

简单sql疑问
select * into a from (select * from b) as temp where 1=0

想复制一个b表的表结构,上面的写法是不是会先查出b表的所有数据再判断1=0呢?

[解决办法]
直接select * into #a from b where 1=0
[解决办法]

SQL code
--复制表结构select * into a from b where 1=0
[解决办法]
探讨
直接select * into #a from b where 1=0

[解决办法]
我在二楼的回复呢?

SQL code
-复制表结构直接执行select * into a from b where 1=0 

热点排行