Creating Stored procedure in DB2 using SQL

Creating Stored procedure in DB2 using SQL

 

  

Hi All,

I face an error while creating a stored procedure in DB2 using SQl.

CREATE PROCEDURE MUTHUKUMARA.Proc1 ( )
LANGUAGE SQL
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN
select * from account;
END P1

The error is
============
MUTHUKUMARA.PROC1 - Create stored procedure returns -104.

MUTHUKUMARA.PROC1: 7: [IBM][CLI Driver][DB2/NT] SQL0104N An unexpected
token "select *" was found following "--------- P1: BEGIN ". Expected
tokens may include: "<delete>". LINE NUMBER=7. SQLSTATE=42601



MUTHUKUMARA.PROC1 - Changes rolled back.

MUTHUKUMARA.PROC1 - Build failed.

Please Help me.

Muthukumar.A

DB2 & UDB email list listserv db2-l LazyDBA home page