|  | Programming Guide |        | 
Suppresses repeating values in selected columns
DBMS [WITH CURSORcursor] UNIQUEcolumn[,column...]
WITH CURSORcursor- Name of declared
SELECTcursor. If the clause is not used, Panther uses the defaultSELECTcursor.
column- Column name in the
SELECTstatement.
DBMS UNIQUEsuppresses repeating values in each named column of a select set when the values are in adjacent rows. Typically, this feature is set for a column named in anORDER BYclause.If the destination variable has a null edit, an occurrence containing a suppressed value is blank, not null.
The setting is turned off by executing the
DBMS UNIQUEcommand with no arguments. Closing a cursor also turns off the setting. If a cursor is redeclared without being closed, the cursor continues to use to the setting forSELECTstatements andCONTINUEcommands.
// Since several titles can be rented to the same customer,
// suppress repeating customer numbers when listing
// outstanding rentals.proc rent_listDBMS DECLARE rent_cursor CURSOR FOR \
SELECT cust_id, title_id, copy_num, due_back FROM rentals \
WHERE due_back < today \
ORDER BY cust_idDBMS WITH CURSOR rent_cursor UNIQUE cust_id
DBMS WITH CURSOR rent_cursor EXECUTE
DBMS WITH CURSOR rent_cursor UNIQUE
return



