Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Is there a difference between LIKE and = when no wildcards are used?
I am writing a stored procedure in PL/SQL. One of the arguments being passed may contain a % character to be used as a wildcard which I then use in a cursor definition:
PROCEDURE get_stuff(site_in VARCHAR2)
IS
CURSOR eq_by_site IS
SELECT site, prod, release, qty FROM site_equip WHERE site LIKE site_in ORDER BY site, prod, release;
My question is: Would I benefit from defining another cursor in which the WHERE clause said "WHERE site = site_in", then examine site_in to see whether it contained a % or not to decide which cursor to use?
Please email replies
Thanks
Ken Denny
kendenny_at_bnr.ca (work)
kdenny_at_interpath.com (home)
Received on Thu Oct 02 1997 - 00:00:00 CDT