SQL Server Performance

grant insert permission on column

Discussion in 'SQL Server 2005 General DBA Questions' started by avipenina, Aug 6, 2008.

  1. avipenina New Member

    Hi,
    can i grant permission INSERT on a column to user?
    according to BOL i can't.
    so if i have a table with a lot of columns and i don't want that this user will have the ability to insert data to all columns except one or two that he need,how can i achieve that?
    THX
  2. Adriaan New Member

    You're confusing two different actions:
    * INSERT adds a new row to a table.
    * UPDATE replaces column values on existing rows.
    You can set only select and update permissions for individual columns. Insert and delete permissions are for the table as a whole.
  3. avipenina New Member

  4. preethi Member

    Insert happens against only a row. If you want to prevent the users from inserting other values (Other than Default values) you can do that.
    Create a view only with updatable columns (Other columns Should be defined to have null or a default value) and grant insert permission against the view.

Share This Page