SQL Server-Agent-Job - Existiert dann Drop?

Gibt es eine ähnliche Möglichkeit in SQL, um Folgendes zu erreichen, aber mit sql-server-agent-Aufträge statt?

hier ist, wie ich es für gespeicherte Prozeduren..

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[storedproc]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
    drop procedure [dbo].[storedproc]
    GO
    CREATE PROCEDURE [dbo].[storedproc] ...

InformationsquelleAutor der Frage madcolor | 2008-09-25

Schreibe einen Kommentar