Locking tempdb

  • Is there a blocking issue with using select into statements in SQL 2000? I have found many articles stating that it is a problem in 6.5.

    Thanks in advance!

    Kevin

  • A "SELECT INTO #temptable" will still lock the system tables in tempdb while it creates the table. A prefered method in SQL 2000 is to use a table variable (declare @tbl TABLE...). When using a table var, you must first declare/create the table, then insert into it. You can create it with a primary key if needed.

    -Dan


    -Dan

  • Exactly....

  • Also, even though is an issue in 7 and 2000 it is not near as bad as what happened in 6.5.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply