The USER function
Use the USER function when you want to define a restricted view of a table that contains only rows that include your user ID. For information about how to create views, see the HCL OneDB™ Database Design and Implementation Guide and the GRANT and CREATE VIEW statements in the HCL OneDB Guide to SQL: Syntax.
The
following query returns the user name (login account name) of the
user who executes the query. It is repeated once for each row in the
table.
If the user name of the current user is richc,
the query retrieves only those rows in the cust_calls table
where
user_id = richc
.