temp table

  • Created temp table # xyz ( name varchar(10)

    Inserted multiple values in temp table like abc , rest,more,money etc...

    when i m doing select * from #xyz , i m getting the results and

    when i m giving to other user , it is giving error like Invalid object name #xyz.

    how to resolve this?

  • Temp tables are specific to the connection that created them, and they will be dropped when that connection closes. If you want a table that multiple users can use, rather use a permanent table.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Or you can create a table in tempdb. The table will be dropped when the instance is restarted.

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

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