oracle - PL/SQL functions with one parameter -


i wondering if help.

i'm @ wits end this.

i want create function take 1 parameter.

here code. keep getting error when run:

error(3,19): pls-00103: encountered symbol ";" when expecting 1 of thefollowing:
begin function pragma procedure subtype type current cursor delete exists prior external language

code

set serveroutput on;  create or replace function checkbooktype (   p_book_type  titles.category ) return boolan is;  begin    if (p_book_type = 'business')       return true;    else     return false;    end if;    return v_returnvalue; end checkbooktype; 

least verbose solution:

create or replace function checkbooktype (         p_book_type in  titles.category%type     ) return boolean  begin    return p_book_type = 'business';  end checkbooktype; 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -