Drop Temp. Table

  • how to drop a temprory table created by command create table #123

    thanks in advance

    from

    alkesh

  • doesnt DROP TABLE #123 work???

    usually if you're using temp tables in a proc - they are automatically dropped as soon as the execution is complete

  • The temporary tables gets dropped automatically once the execution is complete.

    Isn't they get dropped?

  • Depends on what you call execution. For example, if you create a temp table in Query Analyzer it will exist until you drop it explicitly or you close the window (connection). If you're in a loop of some sort you may need to do the explicit drop. Plus I consider it to be a best practice, right up there with setting objects to nothing.

    Andy

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

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