select guest.guestid, guest.firstname,guesttype,reservation.reservationid, rental.checkindate, rental.checkoutdate, reservation.numberofnights
from guest
inner JOIN rental ON rental.guestid = guest.guestid
inner JOIN reservation ON rental.reservationid = reservation.reservationid
where guest.guestid = 1111;
答案 0 :(得分:1)
尝试一下:
CREATE OR REPLACE procedure_name(arg1 data_type, ...) AS
BEGIN
[Your query]
END procedure_name;