-
If one writes a stored procedure
1.) with a drop table statement
SQL SERVER will not let u create the stored proc
warning u that the particular table does not exist
if it is not there
So, you would need create some form of it
2) with a select into table statement
It will tell u that the table already exists (if it exists already)
Now, how does one create a stored proc with these
two above statements
drop table mytable
select * into mytable from oo
Thanks in advance!!
-
Why would you do that?
Use temporary tables if you need to create and drop tables within a stored proc. They exist only in the server's memory and live only as long as the proc runs.
-
hmm..
There are good reasons to do this kind of thing especially
when optimizing queries...
I solved the prob by splitting the stored proc in 2
Monte... Thanks for responding...
P.S Why 96 and not 2000??
-
-
Maybe what you really needed to do here was 'Truncate' the table..........or else I missed the point