Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select after update
Are you are talking about some routine that passes any sql statement , but
you don't want to allow changes to the database, just readonly queries?
Unless you control it at the Oracle privilege level (as others have posted - which is obviously better and easier it seems), then you would have to do some parsing of the statement.
One simple way is to only allow statements that begin with "select". There is no such statement as "select ... after update..." . There is a "select ... for update" , but this requires a subsequent "update where current of cursor" or something like that (syntax of latter is probably not exactly right - been a while since I coded a lot).
And, I don't think selecting a PlSql function is allowed to update the database. Although that might not be true with autonomous (not sure this is spelled right) transactions which are new in 8i .
-- "Erwin1971" <schilt_at_hotmail.com> wrote in message news:dde832f0.0306050615.4af57b90_at_posting.google.com...Received on Fri Jun 06 2003 - 01:31:57 CDT
> I'm curious if it's possible, if an SQL statement starts with
> "Select", to make changes to the database you are using. Like a
> statement Select...after update...I would like to create a control so
> that users can only make sql statements to view the database not to
> alter it.
![]() |
![]() |