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
I created two tables like this:
create table customer(SID int,name varchar(20),primary key(SID));
create table orders(OID int,O_Date date,customer_SID int,primary
key(OID),Foreign key(customer_SID) references customer(SID) on delete
cascade on update cascade);
And inserted values into it.but when