Results 1 to 7 of 7

Thread: SQL GRANT privilege to multiple tables - one or two commands? how?

  1. #1
    Join Date
    Jun 2013
    Posts
    4

    SQL GRANT privilege to multiple tables - one or two commands? how?

    GRANT INSERT ON
    (I need to grant the user privileges to BOTH orders & orderline.

    Do I begin:
    GRANT INSERT ON orders.orderline?
    OR
    GRANT INSERT ON orders (orderline)?
    OR
    make em separate commands? or what? it is unclear. And then of course go on to TO ...blah blah blah

    AND
    MUST GRANT blahblahblah & TO blahblahblah BE on SEPARATE LINES? OR CAN IT ALL BE ON ONE LINE?

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Which rdbms?

  3. #3
    Join Date
    Jun 2013
    Posts
    4

    Hate to say....

    Im a student & dont know yet what those letters stand for?

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    A GRANT statement is applicable to one object at a time, so you have to run two GRANTs for two tables.

  5. #5
    Join Date
    Jun 2013
    Posts
    4
    So does this seem to make sense below, since orders is really one table & orderline is a sep one?:

    GRANT INSERT ON orders to Smith, Jones
    OR
    GRANT INSERT ON orderline to Smith, Jones

    thanks!!!

  6. #6
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932

  7. #7
    Join Date
    Jun 2013
    Posts
    4
    thanks very much been stumbling all over that one yet it probably is not the "biggest" deal.....
    thanks!

Posting Permissions

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