vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I am pretty new to DB2 (and SQL as well), and run into a few questions: 1) Is there anybody that knows if there is a way to write the following in one SQL statement?: grant select on table agent to user a, user b, user c; grant select on table customer to user a, user b, user c; grant select on table product to user a, user b, user c; (there are more tables, but only these shoould the users get rights on) and 2) Is it possible to grant select rights onto only a few columns of a table? If so, what does the command look like? (also one command for more columns possible?) Thank you in advance. Eric |
| |||
| Eric wrote: > Hi, > > I am pretty new to DB2 (and SQL as well), and run into a few > questions: > > 1) Is there anybody that knows if there is a way to write the > following in one SQL statement?: > grant select on table agent to user a, user b, user c; > grant select on table customer to user a, user b, user c; > grant select on table product to user a, user b, user c; > (there are more tables, but only these shoould the users get rights > on) Your syntax above should work fine. > and 2) Is it possible to grant select rights onto only a few columns > of a table? > If so, what does the command look like? (also one command for more > columns possible?) > This is typically done using one or more views, and granting select priviliges on the view(s) to the appropriate users. Currently you can only grant update or references authorities on a subset of columns in a table. Good luck, -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- |
| ||||
| "Eric" <erichezemans@yahoo.com> wrote in message news:5d0qsvsoip6clpnehf536f9devq5j3jpm8@4ax.com... > Hi, > > I am pretty new to DB2 (and SQL as well), and run into a few > questions: > > 1) Is there anybody that knows if there is a way to write the > following in one SQL statement?: > grant select on table agent to user a, user b, user c; > grant select on table customer to user a, user b, user c; > grant select on table product to user a, user b, user c; > (there are more tables, but only these shoould the users get rights > on) > > and 2) Is it possible to grant select rights onto only a few columns > of a table? > If so, what does the command look like? (also one command for more > columns possible?) > > Thank you in advance. > Eric > I don't know which DB2 platform you are running, but all this information is contained in the SQL Reference for the appropriate DB2 you are running. You can download the manual from the IBM website: http://www-3.ibm.com/software/data/pubs/ The manuals are at the bottom of the screen. |
| Thread Tools | |
| Display Modes | |
|
|