次のSELECT文では、リクエストを実行したユーザーに権限が付与されているPersonnelデータベース内のすべてのテーブルの情報が表示されます。
SELECT * FROM DBC.UserRightsV WHERE DatabaseName=’Personnel’ AND TableName = ’All’ ;
結果:
DatabaseName TableName AccessRight GrantorName ------------ --------- ----------- ----------- Personnel Employee R DBC Personnel Employee U DBC Personnel Employee I DBC