aonestar
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_trg_room_before_update_connecting_room
Parameters
Name
Type
Mode
Definition
begin -- ตรวจสอบว่า user พยายามเชื่อมห้องกับตัวเอง if old.id = any(NEW.connect_rooms) THEN -- ❗ ปัดทิ้งการ update ทั้งหมด -- RETURN NULL; raise exception 'Connecting room % is not valid', new.room_number; END IF; RETURN NEW; END;