この例の最初の文 (SETUSER "Joe") で、SET USER システム権限を持つユーザが Joe を同一化し、Joe の権限を使用していくつかの操作を実行します。2 番目の文 (SETUSER WITH OPTION "Jane") で、ユーザは Jane を同一化して、現在有効な Jane の権限とデータべースオプションを使用して、いくつかの操作を実行します。3 番目の文 (SETUSER) で、ユーザは Joe と Jane のユーザ ID、権限、データベースオプションを戻します。
SETUSER "Joe"
// Some operations are run using Joes privileges ...
SETUSER WITH OPTION "Jane"
// Some operations are run using Jane's privileges, and the
// database options in effect are changed to the current
// database options for Jane
SETUSER