GRANT TEMPORARY SUBSCRIBE
GRANT TEMPORARY SUBSCRIBE[(<column_comma-list>)] ON <table_name> TO <user_name>;
REVOKE TEMPORARY SUBSCRIBE[(<column_comma-list>)]ON <table_name> FROM <user_name>; To set a subscription as active, an application issues a SET SUBSCRIPTION statement.
- Important: The user issues a SET SUBSCRIPTION command as usual giving the name of the base table instead of a subscription name.
Example: Retrieving Changed Views from ISQL
SET SUBSCRIPTION "Employees" ACTIVE; SELECT NAME, DEPARTMENT, SALARY FROM "Employees"; COMMIT; <Another user reassigns an existing employee to another department and gives another employee a raise> SELECT NAME, DEPARTMENT, SALARY FROM "Employees"; <change> NAME DEPARTMENT SALARY update joe sales 50000 update mary finance 75000 SET CHANGES; SELECT NAME, DEPARTMENT, SALARY FROM "Employees"; <change> NAME DEPARTMENT SALARY update <same> sales <same> update <same> <same> 75000 COMMIT; SET SUBSCRIPTION "Employees" INACTIVE;
ISQL has a collection of SET statements that toggle a display set. The SET CHANGES display toggle alternates between showing the column data value with its change status as a subordinated annotation. The <change> column is a pseudo column that shows the type of DML statement that modified the value of a column. All of this change state is returned by the XSQLVAR.SQLIND member of the new XSQLDA structure.
Minimal support for changed data views is provided by InterBase SQL with the addition of a IS SAME or IS NOT SAME clause as the following example illustrates:
- Important: Using IS NOT SAME in SELECT queries
SELECT NAME, DEPARTMENT, SALARY FROM "Employees" WHERE SALARY IS NOT SAME; <change> NAME DEPARTMENT SALARY update mary finance 75000
We see that Joe's department reassignment is not returned since he received no compensation adjustment for a lateral move.
- GRANT SUBSCRIBE
- CREATE SUBSCRIPTION
- DROP SUBSCRIPTION
- SET SUBSCRIPTION
- Data Definition Guide