Add available bookings scripts and results
This commit is contained in:
10
sql/check_booking.sql
Normal file
10
sql/check_booking.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- available bookings - task 2
|
||||
-- changes:
|
||||
-- changed BookingDate (Reserved) data type from date to datetime, because I assumed that Little Lemon
|
||||
-- allows wants bookings per day and table - a table is considered blocked for 2 hours
|
||||
-- noqa: disable=CP03,LT02,RF03
|
||||
create procedure CheckBooking (in Reserved datetime, in TableNumber int, out IsFree boolean) --
|
||||
begin
|
||||
set IsFree = TableIsFree(Reserved, TableNumber);
|
||||
select concat("Table ", TableNumber, " is ", if(IsFree, "free", "already booked")) as BookingStatus;
|
||||
end
|
||||
Reference in New Issue
Block a user