Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Posts
    74

    Unanswered: Giving user permissions tp columns

    Hi

    I have created a user and given select permissions on a table, I want to go deeper and just give select on a few columns within the table but unable to do so. Can someone tell me how I can do this.

    Thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    2,934
    Provided Answers: 12
    Revoke the SELECT right for that table from the user.
    Create a view that contains only the columns he/she should see
    Grant the user SELECT on that view.

    P.S.: what do you mean with "tp columns"? Is tp your abbreviation for table?

  3. #3
    Join Date
    Jan 2006
    Posts
    74
    Thanks for that.

    It was meant to say to it was a typo.

    Thanks Shammat

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Do you know what Books Online is?

    From BOL:

    GRANT
    { ALL [ PRIVILEGES ] | permission [ ,...n ] }
    {
    [ ( column [ ,...n ] ) ] ON { table | view }
    | ON { table | view } [ ( column [ ,...n ] ) ]
    | ON { stored_procedure | extended_procedure }
    | ON { user_defined_function }
    }
    TO security_account [ ,...n ]
    [ WITH GRANT OPTION ]
    [ AS { group | role } ]
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Jan 2006
    Posts
    74
    Yes I do but I forgot it was there.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •