How can we improve Azure SQL Database?

SELECT INTO.

Without allowing SELECT INTO in order to at least create an EMPTY table (which can then have a clustered index created, etc) makes Azure, in practical terms, unusable for our purposes.

Even better, why couldn't MS provide a T-SQL query to retrieve what Management Studio returns in "Script As"? You obviously already have the code (in SSMS) so why couldn't you have made this scripting available on SQL Server itself through a query interface (like Oracle does)? We've had to reinvent the wheel in order to create our own such functionality and it's caused a maintenance nightmare.

174 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    TerryTerry shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Ronny HansenRonny Hansen shared a merged idea: Add support for "SELECT INTO" for #temp tables in SQL Azure  ·   · 

    5 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • TerryTerry commented  ·   ·  Flag as inappropriate

        As Kevin Chamberlain suggested, why not at least allow a SELECT INTO with 0 rows to enable creating just the table structure. Would have been enormously helpful for us. Will wait for Azure to mature a little more.

      • Jonathan WinataJonathan Winata commented  ·   ·  Flag as inappropriate

        The lack of this feature is a major inconvenience for us since we are using the temp table for data validation during bulk imports.

      • Jordan B.Jordan B. commented  ·   ·  Flag as inappropriate

        I get why this is the case with Azure tables requiring clustered indexes for replication and whatnot, but why on earth enforce this restriction for temp tables? Select Into statements are widely used in my organization for generic dynamic triggers. Knowing the exact column definition is one thing, but this restriction creates a significant maintenance liability.

      • Jim PelletierJim Pelletier commented  ·   ·  Flag as inappropriate

        This feature gap has been a major inconvenience for our company as well. If I could give it more votes, I would.

      • Kevin ChamberlainKevin Chamberlain commented  ·   ·  Flag as inappropriate

        Additionally it would be really nice to allow a select into where no data is being inserted into the table. This is often used to establish a table (or # table) structure that is dynamically generated first, then populated so system objects aren't being locked while the data from the select is being gathered to put into the table. This would then allow us to 1. Create a table dynamically, 2. Create the clustered key, 3. Populate the table from the query.

      Feedback and Knowledge Base