什么是“dbms_cq_notification.cq_notification_queryid”在这个SELECT上做什么?我只是在学习CQN。我也相信mgr_id没有被使用或是吗?
DECLARE
reginfo cq_notification$_reg_info;
mgr_id NUMBER;
dept_id NUMBER;
v_cursor SYS_REFCURSOR;
regid NUMBER;
qosflags NUMBER;
BEGIN
qosflags := DBMS_CQ_NOTIFICATION.QOS_QUERY + DBMS_CQ_NOTIFICATION.QOS_ROWIDS;
reginfo := cq_notification$_reg_info('chnf_callback', qosflags,0, 0, 0);
regid := DBMS_CQ_NOTIFICATION.NEW_REG_START(reginfo);
OPEN v_cursor FOR
SELECT DBMS_CQ_NOTIFICATION.CQ_NOTIFICATION_QUERYID,
manager_id
FROM HR.employees
WHERE employee_id = 7902;
CLOSE v_cursor;
OPEN v_cursor for
SELECT DBMS_CQ_NOTIFICATION.CQ_NOTIFICATION_QUERYID,
department_id
FROM HR.departments
WHERE department_name = 'IT';
CLOSE v_cursor;
DBMS_CQ_NOTIFICATION.REG_END;
END;
我从这里{{3}}
取了它