Thread: cursors
View Single Post

   
  #1 (permalink)  
Old 03-17-2008, 07:13 AM
smriti Sebastian
 
Posts: n/a
Default cursors

Hi all,
I tried to implement a cursor using the following statement:
create procedure curdemo()
begin
declare cursor1 cursor for select SID from customer;

I have a customer table with a field SID.
BUt I am getting an error
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use
near '' at line 1

Plz help me to solve this.Thanks in advance.

Reply With Quote