Курсовая работа: Автоматизированная система бронирования авиабилетов
;
'
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Delete_OrderByUserID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'-- Удаление записей из таблицы Orders по UserID
CREATE PROCEDURE [dbo].[Delete_OrderByUserID]
@UserID int
AS
BEGIN
DELETE FROM Orders WHERE [UserID]=@UserID
END
;
'
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[FlightView]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[FlightView] AS
SELECT
FlightID,