Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Index Creation Question - Which is More Efficient?
Acme Acmeson wrote:
>
> SQL> insert into emp (empno,ename) values(9999,' acme ');
>
> 1 row created.
>
> SQL> commit;
>
> Commit complete.
>
> SQL> select '<'||ename||'>' from emp where empno=9999;
>
> '<'||ENAME||
> ------------
> < acme >
>
> SQL>
If you write a lousy insert statement the solution is to fix
the insert statement. What you have here is a waste of CPU.
INSERT INTO emp (empno, ename) VALUES (9999, TRIM(' acme '));
You can only insert a record one time.
You can query is numerous times.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Sun Jul 30 2006 - 16:32:02 CDT