Add modify bookings scripts and results
This commit is contained in:
13
sql/cancel_booking.sql
Normal file
13
sql/cancel_booking.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- modify bookings - task 3
|
||||
-- add and update bookings - task 3
|
||||
-- noqa: disable=CP03,LT02,RF03
|
||||
create procedure CancelBooking (in BookingID int)
|
||||
begin
|
||||
delete from Bookings as B
|
||||
where B.BookingID = BookingID;
|
||||
if row_count() = 1 then
|
||||
select concat("Booking ", BookingID, " cancelled") as Confirmation;
|
||||
else
|
||||
select concat("Booking ", BookingID, " not cancelled - missing booking") as Confirmation;
|
||||
end if;
|
||||
end
|
||||
Reference in New Issue
Block a user