You are here

Добавить комментарий

GRANT - grant table privileges to users

Syntax

    GRANT { SELECT | INSERT | UPDATE | DELETE | ALL }
    ON tablename
    TO
    { User | {GROUP|ROLE} groupname | PUBLIC } [, ...] [ WITH GRANT OPTION ];

Description

    With GRANT you can give following rights or privileges to database users or roles (groups of users):
    SELECT - revtrieve or query data
    INSERT - insert new records into a table
    UPDATE - modify datafields in a table
    DELETE - delete records from a table
    ALL - means all rights on a table

    When PUBLIC is used instead of a list of concrete users or roles, then the specifyed priviledges will be given to all users of the database system (depending on the used RDMBS the rights are given only to the users woth connect permission to the current database).

    WITH GRANT OPTION allows users to delegate their table priviledges to other users.

    Example:

GRANT SELECT ON tkunden TO my_user;

The user my_user becames the priviledge to query, to retrieve data from the table tkunden.

Categories: