Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: 8.1.5 primary key and like% goofiness

Re: 8.1.5 primary key and like% goofiness

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 26 May 1999 15:56:39 GMT
Message-ID: <3751197a.18165039@newshost.us.oracle.com>


A copy of this was sent to khs_rider.x.mapson_at_geocities.com (Darren Mallette) (if that email address didn't require changing) On Wed, 26 May 1999 14:43:19 GMT, you wrote:

>Hello,
>
>Has anyone come across this "bug" with Oracle 8.1.5 -- we can't do a
>query using the like% operator on a primary key column. Other indexed
>and non-indexed columns query fine. I'd appreciate any advice on
>fixing this.
>
>-Darren

You need to post a tiny bit more information. For example -- here is an example showing a query against a primary key using LIKE and it returns data:

Connected to:
Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production

SQL> create table emp as select * from scott.emp;

Table created.

SQL> alter table emp add constraint emp_pk primary key(empno);

Table altered.

SQL> select * from emp where empno like '77%';

     EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ----------


      7782 CLARK MANAGER 7839 09-JUN-81 2450 10

      7788 SCOTT ANALYST 7566 09-DEC-82 3000 20

when you say "we can't do a query ..." what exactly do you mean?

See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed May 26 1999 - 10:56:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US