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: What happens to this code

Re: What happens to this code

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 25 Feb 2007 11:38:33 -0800
Message-ID: <1172432313.262693.285530@m58g2000cwm.googlegroups.com>


On Feb 25, 1:57 pm, "Ana C. Dent" <anaced..._at_hotmail.com> wrote:
> surajkum..._at_gmail.com wrote in news:1172425887.051518.256860
> @p10g2000cwp.googlegroups.com:
>
>
>
>
>
>
>
> > Examine this code:
> > CREATE OR REPLACE STORED FUNCTION get_sal
> > (p_raise_amt NUMBER, p_employee_id employees.employee_id%TYPE)
> > RETURN NUMBER
> > 1z0-147
> > Leading the way in IT testing and certification tools,www.testking.com
> > - 37 -
> > IS
> > v_salary NUMBER;
> > v_raise NUMBER(8,2);
> > BEGIN
> > SELECT salary
> > INTO v_salary
> > FROM employees
> > WHERE employee_id = p_employee_id;
> > v_raise := p_raise_amt * v_salary;
> > RETURN v_raise;
> > End;
>
> > What happens after execution of this code.
>
> Everybody gets higher pay.- Hide quoted text -
>
> - Show quoted text -

Pull your SQL manual for whatever unnamed version of Oracle you are dealing with and see if "stored" is a valid keyword. The statement will errror off.

HTH -- Mark D Powell -- Received on Sun Feb 25 2007 - 13:38:33 CST

Original text of this message

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