BKRaja
BKRaja

Reputation: 121

stored procedure in informix

I tried to create a sample stored procedure in informix but it gives me a syntax error. Can any one say whats wrong with this?

drop procedure if exists sample(); 
create dba procedure sample() 
update employee set last_name="Tietz"  where emp_id = '2537';  
end procedure;

Thanks

Upvotes: 1

Views: 3511

Answers (1)

RET
RET

Reputation: 9188

The IF EXISTS clause is only available in very recent versions of Informix. I've got a couple of instances handy: 11.50.FC2 and 11.70.FC7. The statement DROP PROCEDURE IF EXISTS foobar() works on the later one only.

The rest of it looks OK to me.

Upvotes: 3

Related Questions