About 544,000 results
Open links in new tab
  1. sql server - Difference between #temptable and ##TempTable?

    Jan 9, 2014 · Global Temporary Tables are visible to all connections of SQL Server. Global Temporary Tables are only destroyed when the last connection referencing the table is closed …

  2. Local and global temporary tables in SQL Server

    Feb 23, 2014 · Local temporary tables are deleted after the user disconnects from the instance of SQL Server. Global temporary tables are visible to any user and any connection after they are …

  3. sql - How to create Temp table with SELECT - Stack Overflow

    Jul 15, 2012 · Note also that any temporary table created inside a stored procedure is automatically dropped when the stored procedure finishes executing. If stored procedure A …

  4. sql server - Is there a way to loop through a table variable in TSQL ...

    Let's say I have the following simple table variable: declare @databases table ( DatabaseID int, Name varchar(15), Server varchar(15) ) -- insert a bunch rows into @

  5. sql server - Finding the data types of a SQL temporary table

    I need to switch from using a #temp table to a @table variable so that I can use it in a function. My query uses insert into #temp (from multiple tables) like so: SELECT a.col1, a.col2, b.

  6. sql - Inserting data into a temporary table - Stack Overflow

    Aug 2, 2012 · After having created a temporary table and declaring the data types like so; CREATE TABLE #TempTable( ID int, Date datetime, Name char(20)) How do I then insert the …

  7. sql - Insert results of a stored procedure into a temporary table ...

    Mar 17, 2009 · select * into tmpBusLine from exec getBusinessLineHistory '16 Mar 2009' Output message: Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'exec'. I have …

  8. What's the difference between a temp table and table variable in …

    Aug 26, 2008 · This means you should be aware of collation issues if using temp tables and your db collation is different to tempdb's, causing problems if you want to compare data in the temp …

  9. sql server - Get structure of temp table (like generate sql script) …

    Jan 24, 2012 · How do I get structure of temp table then delete temp table. Is there a sp_helptext for temp tables? Finally is it possible to then delete temp table in same session or query …

  10. SQL Server tables: what is the difference between @, # and

    Feb 8, 2010 · I would focus on the differences between #table and @table. ##table is a global temporary table and for the record in over 10 years of using SQL Server I have yet to come …