Any thing wrong with following PL/SQL? I kept get compliling error.
create or replace procedure sp_adduser
(pid in contact.person_id%type,
email in contact.e_mail%type,
pass in contact.password%type,
ret out number )
as
begin
declare
cnt number;
begin
select count(*) into cnt from contact;
if cnt > 0 then
ret:=1;
else
insert into contact (person_id, e_mail, password) values(pid, email,pass, sysdate);
ret:=0;
end if
EXCEPTION
ret:=1;
end;
end sp_adduser;