SQL Azure不支持“入选” - 有另一种方式? [英] SQL Azure doesn't support 'select into' - Is there another way?
问题描述
我有一个非常复杂的表,我想采取的临时备份,而我做一些改变。通常情况下,我只是做到以下几点:
I have a very complicated table I'd like to take a temporary backup of whilst I make some changes. Normally, I'd just do the following:
SELECT *
INTO temp_User
FROM dbo.[User] AS u
不幸的是我使用Azure的,看来这是不支持的:
Unfortunately I'm using Azure, and it appears this isn't supported:
消息40510,级别16,状态1,行2声明SELECT INTO不是
支持这个版本的SQL Server。
Msg 40510, Level 16, State 1, Line 2 Statement 'SELECT INTO' is not supported in this version of SQL Server.
有没有办法来重新创建这个功能到一个函数,有可能?我可以通过脚本的表,创建它,然后插入使用select语句的数据做到这一点,但我给怎么需要我经常使用Azure以及多少个数据库在这方面这是非常笨拙的工作。
Is there a way to re-create this feature into a function, potentially? I could do this by scripting the table, creating it and then inserting data using a select statement but given how frequently I use Azure, and how many databases I need to work on in this area this is very unwieldy.
推荐答案
新的<一个href=\"http://azure.microsoft.com/en-us/documentation/articles/sql-database-$p$pview-whats-new/\">Azure DB更新preVIEW 有这个问题解决了:
The new Azure DB Update preview has this problem resolved:
在V12 preVIEW使您能够创建一个没有聚集表
指数。此功能是它支持T-SQL中特别有用
SELECT ... INTO从一个查询结果创建表的语句。
The V12 preview enables you to create a table that has no clustered index. This feature is especially helpful for its support of the T-SQL SELECT...INTO statement which creates a table from a query result.
<一个href=\"http://azure.microsoft.com/en-us/documentation/articles/sql-database-$p$pview-whats-new/\">http://azure.microsoft.com/en-us/documentation/articles/sql-database-$p$pview-whats-new/
这篇关于SQL Azure不支持“入选” - 有另一种方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!