Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

create, drop, create same #temp is an error - why?

$
0
0

Why is this illegal?  Even a parse check generates the error!  SQL 2008 R2.

Thanks,

Josh

create table #foo(i int);
drop table #foo;
create table #foo(i int);
drop table #foo;
/*
Msg 2714, Level 16, State 1, Line 3
There is already an object named '#foo' in the database.
*/


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>