Last post Jun 04, 2011 08:59 AM by asurai
Jun 04, 2011 06:37 AM|gyana.ojha|LINK
I need help in my current requirement.
I have a temporary table which row count i need set to a variable.
Now I want check wheather that temporary table exists or not before set row count to that variable.
@RowCount is my local variable inside StoreProcedure.
and _tempTable is my temporary table .
I want check whether _tempTable exists or not before set its rowcount to @RowCount.
I am using my Sql 5.0
Any help are welcome
Jun 04, 2011 08:59 AM|asurai|LINK
You can use the following script to check a temporary table is exist or not.
If OBJECT_ID("temp_teable_name") IS NOT NULL
PRINT '#temp exists!'
PRINT '#temp does not exist!'