May 19, 2013, 08:05:55 pm
Main Site
Home
Help
Search
Login
Register
PSOUG.org
»
General Category
»
PSOUG
»
SELECT on a sequence and nextval
« previous
next »
Print
Pages: [
1
]
Author
Topic: SELECT on a sequence and nextval (Read 3047 times)
ssharma
Newbie
Posts: 2
SELECT on a sequence and nextval
«
on:
September 23, 2009, 09: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
Re: SELECT on a sequence and nextval
«
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;
«
Last Edit: January 03, 2010, 09:41:39 am by Mike
»
Logged
Print
Pages: [
1
]
« previous
next »
PSOUG.org
»
General Category
»
PSOUG
»
SELECT on a sequence and nextval