Welcome, Guest. Please login or register.
September 09, 2010, 02:50:12 am
 
 PSOUG Forum Jump to:  

Home Help Search Login Register
PSOUG.org  |  General Category  |  PSOUG  |  Topic: SELECT on a sequence and nextval « previous next »
Pages: [1] Print
Author Topic: SELECT on a sequence and nextval  (Read 1428 times)
ssharma
Newbie
*
Posts: 2


View Profile
« on: September 23, 2009, 10:44:01 am »

Is it possible to grant SELECT on a sequence to a user (readonly user), but user should not be able to increment the sequence by using nextval on that sequence?

 Because if it does so, the user is not "readonly".
Logged
cory
Newbie
*
Posts: 1


View Profile
« Reply #1 on: January 02, 2010, 06:58:09 pm »

Would creating a view returning last_number+increment_by work for you?  The users can be granted read only access to the view.

CREATE VIEW sequences_next_number  AS
  SELECT a.sequence_name
     , a.last_number+increment_by as next_number
   FROM all_sequences a;
Logged
Pages: [1] Print 
PSOUG.org  |  General Category  |  PSOUG  |  Topic: SELECT on a sequence and nextval « previous next »
Jump to:  


Login with username, password and session length
PSOUG.org - SELECT on a sequence and nextval

SEO light theme by © Mustang forums. Powered by SMF 1.1.11 SMF © 2006-2008, Simple Machines LLC