MySQL Forums
Forum List  »  Turkish

Mysql kursor Nasıl
Posted by: dici boy
Date: May 04, 2009 03:23PM

Arkadaşlar mysql de cursor nasıl yapılıyor . Ayrıntılı anlatabilecek biri varmı ? Aşağıdaki kodu çalıştıramadım.
Kursörde DECLARE HANDELER deyimi nedir ne işe yarıyor, fakrlı kullanımları var galiba öyle denedim böyle denedim bi türlü beceremedim , ör: aşağıdaki kullanımdan farklı olarak birde not found done = 1 gibi kodlar var , anlamadım , basit bir döngünün içinde işlemlerimi nasıl yaptırabilirim, hatta mümkünse Sql serverdeki kullanım mantığıyla anlatabilecek biri varmı ?

declare ad VARCHAR(55);
declare kursor_x cursor for select ad_soyad from tablo_esas ;
open kursor_x;
BEGIN
DECLARE EXIT HANDLER FOR SQLSTATE '02000'
BEGIN END;
LOOP

FETCH kursor_x into ad;
insert into AK_tablo (ad_soyad)
values ( ad );

END LOOP;
END;
close kursor_x;

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql kursor Nasıl
8932
May 04, 2009 03:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.