Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Oracle - MS Server / 8 / procAdd

.txt
Скачиваний:
20
Добавлен:
17.04.2018
Размер:
1.26 Кб
Скачать
-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Prishutova Ekaterina
-- Create date: 15.06.16
-- Description: добавление строк в таблицу Operation
-- =============================================
CREATE PROCEDURE procAdd
-- Add the parameters for the stored procedure here
@OperStart datatime,
@OperFinish datatime,
@StudId int,
@BookId int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
UPDATE dbo.Student SET NORR=NORR + 1 WHERE StudId=@StudId
SET NOCOUNT ON;
INSERT INTO dbo.Operation(OperStart, OperFinish, StudId, BookId)
VALUES (@OperStart, @OperFinish ,@StudId , @BookId );
END
GO



____________________________


EXECUTE procAdd "20.02.15", "20.02.16", 5, 1;
GO
Соседние файлы в папке 8