Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Using bind variables
"Randy Harris" <randy_at_SpamFree.com> wrote in message news:UmU8e.108$fw2.45_at_newssvr33.news.prodigy.com...
> "Dave" <x_at_x.com> wrote in message > news:GbU8e.15030$G8.11877_at_text.news.blueyonder.co.uk...
> clear>> > I haven't yet figured out how to use them in a view and would
>> > why bind variables should be used, rather than string literals, in
>> > queries.
> a>> >
>> > pointer in the right direction.
>> >
>> > create or replace view myview as
>> > select col1, col2, col3
>> > from t
>> > where
>> > t.col3 in ('A', 'B', 'C')
>> >
>> > How should I change that to use a bind variable?
>> >
>> > I'm using 8.1.7.4
>> >
>> > --
>> > Randy Harris
>> > (tech at promail dot com)
> > I thought I understood Tom Kyte to say that if there are literals in the > SQL, Oracle has to recompile the statement every time it is run, but if > not, > it remains compiled. Am I confused? > > > >
only if the literals change which in a view they dont, its all about shared sql and that sql is shareable Received on Mon Apr 18 2005 - 15:03:11 CDT