You must have at least the Select privilege on a table or columns to create a view on that table. For views that reference only tables in the current database, if the owner of a view loses the Select privilege on any base table underlying the view, the view is dropped.
You have the same privileges for the view that you have for the table or tables contributing data to the view. For example, if you create a view from a table to which you have only Select privileges, you can select data from your view but you cannot delete or update data. For information on how to create a view, see CREATE VIEW .
When you create a view, PUBLIC does not automatically receive any privileges for a view that you create. Only you have access to table data through that view. Even users who have privileges on the base table of the view do not automatically receive privileges for the view.
You can grant (or revoke) privileges on a view only if you are the owner of the underlying base tables, or if you received these privileges on the base table with the right to grant them (specified by the WITH GRANT OPTION keywords). You must explicitly grant those privileges within your authority, because PUBLIC does not automatically receive any privileges on a view when it is created.
The creator of a view can explicitly grant Select, Insert, Delete, and Update privileges for the view to other users or to a role. You cannot grant Index, Alter, Under, or References privileges on a view (nor can you specify the ALL keyword for views, because ALL confers Index, References, and Alter privileges).
You can specify two privileges on data types that are not built-in data types:
Type-Level Privileges: |--+-USAGE ON TYPE--type_name-----+-----------------------------| '-UNDER ON TYPE--row_type_name-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
row_type_name | Named ROW type on which the Under privilege is granted | Named ROW data type must exist | Identifier, p. Identifier; Data Type, p. Data Type |
type_name | User-defined type on which the Usage privilege is granted | User-defined data type must exist. | Identifier, p. Identifier; Data Type, p. Data Type |
To see what privileges exist on user-defined data types, check the sysxtdtypes system catalog table for the owner of each UDT, and the sysxtdtypeauth system catalog table for any other users or roles that hold privileges on UDTs. See the IBM Informix Guide to SQL: Reference for information on the system catalog tables.
For all the built-in data types, however, these access privileges are automatically available to PUBLIC and cannot be revoked.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]