Two seperate sp running with same names @temp1.... can that create trouble

  • Hi

    I have two sepeate sp that run at the same time. And each one of them as in memory temp tables. Is it a problem with they have the temp tables with the same name? Like @temp1 in sp1 and @temp2 in sp2

    Help please on this

    Thanks

    -Sarah

  • Hi Madam Curie,

    No problem at all. In a Stored Procedre, scope of Temp. Table is only inside the procedure. Outside of procedure, Temp Table will not exist.

    One more thing, every temp table has name of 128 characters in tempdb apart from actual name. Suppose you have created a temp table #T but its name in tempdm will look like: #T__________________________________________________________________________________________________________________000000000006.

    It means SQL Sever appends some underscores along with some text/numbers at the end of actual name.

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

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