Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

drop view [Table of Contents] insert (dynamic command)

Access Service User's Guide DirectConnect for AS/400

[-] Chapter 7 Using Sybase mode commands
[-] grant

grant

Description

Assigns authorizations to users.

Syntax

To grant authorization to access database objects:

grant {all [privileges]| permission_list}
 on {table_name [(column_list)]
 | view_name[(column_list)]
 | stored_procedure_name}
 to {public | name_list}
 [with grant option]

To grant authorization to create database objects:

grant {all [privileges] | command_list}
 to {public | name_list}

Any valid object in the catalog can be substituted for table_name or view_name.

Parameters

all

when used to assign authorization to access database objects (first syntax format), all specifies that all privileges applicable to the specified object are granted or revoked.

permission_list

is a list of authorizations granted.

command_list

is a list of commands granted.

table_name

is the name of a table in the database.

column_list

is a list of columns, separated by commas, to which the privileges apply.

view_name

is the name of a view in the current database. Only one view can be listed for each grant command.

stored_procedure

is the name of a stored procedure in the database.

public

is all users of the "public" group, which includes all users of the system.

name_list

is a list of users' database names or group names or both, separated by commas.

with grant option

allows the users specified in name_list to grant the privileges specified by permission_list to other users.

Examples

Example 1

grant insert, delete
 on titles
 to mary, sales

Example 2

grant update
 on titles (price, advance)
 to public

Example 3

grant create database, create table
 to mary, john

Example 4

grant all on titles
 to public

Example 5

grant all
 to public

Example 6

grant update on authors
 to mary
 with grant option

Example 7

grant select, update on titles(price)
 to bob
 with grant option

Usage


drop view [Table of Contents] insert (dynamic command)