Modifying Views; Permissions On Views - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Working with views
Inserting and deleting
on views

Modifying views

Example

Permissions on views

130
CREATE VIEW viewname AS
,
, and
UPDATE
INSERT
DELETE
on others, depending on their associated
You cannot update, insert into or delete from views in the following cases:
Views containing aggregate functions, such as
Views containing a
GROUP BY
Views containing a
UNION
In all these cases, there is no way to translate the
into an action on the underlying tables.
You can modify a view using the
statement replaces a view definition with a new definition; it does not modify
an existing view definition.
The
statement maintains the permissions on the view.
ALTER VIEW
For example, to replace the column names with more informative names in the
view described above, you could use the following statement:
DepartmentSize
ALTER VIEW DepartmentSize
(Dept_ID, NumEmployees)
AS
SELECT dept_ID, count(*)
FROM Employee
GROUP BY dept_ID
A user may perform an operation through a view if one or more of the
following are true:
The appropriate permission(s) on the view for the operation has been
granted to the user by a DBA.
The user has the appropriate permission(s) on all the base table(s) for the
operation.
statements are allowed on some views, but not
statement.
SELECT
COUNT(*)
clause in the
SELECT
operation
UPDATE
statement. The
ALTER VIEW
statement
,
, or
INSERT
DELETE
ALTER VIEW

Advertisement

Table of Contents
loading

Table of Contents