I'm trying to drop a table and get error. I've tried to use the 'If Exists..." but cannot get the syntax to work
Error:
Cannot drop the table 'JobTable', because it does not exist in the system catalog.
CREATE PROCEDURE sp_CreateJobTable
as
DROP TABLE JobTable
create table JobTable
(
job_date datetime,
job_number char(15),
job_phase char(15),
asphalt_delivered int,
job_received int
)
GO
Error:
Cannot drop the table 'JobTable', because it does not exist in the system catalog.
CREATE PROCEDURE sp_CreateJobTable
as
DROP TABLE JobTable
create table JobTable
(
job_date datetime,
job_number char(15),
job_phase char(15),
asphalt_delivered int,
job_received int
)
GO