Курсовая работа: Автоматизированная система бронирования авиабилетов
FROM Flights,Aircrafts WHERE Flights.FlightID=@flightID
AND Flights.AircraftID=Aircrafts.AircraftID
ELSE
SELECT @count=Aircrafts.Count2
FROM Flights,Aircrafts WHERE Flights.FlightID=@flightID
AND Flights.AircraftID=Aircrafts.AircraftID
RETURN @count
END'
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].[Insert_FlightString]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'-- Вставка новой записи в таблицу Flight
CREATE PROCEDURE [dbo].[Insert_FlightString]
@dateDeparture datetime,
@dateArrival datetime,
@price1 decimal(18,0),
@price2 decimal(18,0),
@company int,
@aircraft int,
@cityDeparture int,
@cityArrival int
AS
BEGIN
INSERT INTO [Flights]