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

Home -> Community -> Usenet -> c.d.o.server -> Re: help me in getting the meaning of oracle or jsp statemnt

Re: help me in getting the meaning of oracle or jsp statemnt

From: Michael Kuznetsov <mvk_at_servocomp.ru>
Date: 28 Mar 2003 04:48:21 -0800
Message-ID: <1543a3e7.0303280448.6bc1e333@posting.google.com>


kaasiein_at_yahoo.co.in (kasi) wrote in message news:<f5309842.0303250008.47c94db_at_posting.google.com>...
> hi everyone,
> i'm working with a jsp code which uses oracle as backend i come across
> a statement like this
>
> rs2=st2.executeQuery("select name from emp where ecode='"+ecode+"'");
>
> what the + mean in --"+ecode+"
> is it related to jsp or oracle,
> help me in bebuging the code
> buy
> kasi

Hi kasi,

It's simple. + is string concatenation operator in Java.

String ecode = "1234";
rs2=st2.executeQuery("select name from emp where ecode='"+ecode+"'");

Oracle Database will recive this SQL operator:  

select name from emp where ecode='1234'

Regards,
Michael
Brainbench MVP for Oracle Programming
http://www.brainbench.com Received on Fri Mar 28 2003 - 06:48:21 CST

Original text of this message

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