﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rekürsif Prosedürler &#8211; SQL Server Eğitimleri</title>
	<atom:link href="https://sqlserveregitimleri.com/etiket/rekursif-prosedurler/feed" rel="self" type="application/rss+xml" />
	<link>https://sqlserveregitimleri.com</link>
	<description>SQL Server ile ilgili her şey</description>
	<lastBuildDate>Sat, 26 Feb 2022 13:13:31 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>SQL Server’da Faktöriyel Hesabını Rekürsif Hesaplayan Prosedür</title>
		<link>https://sqlserveregitimleri.com/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-prosedur</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Fri, 12 Jul 2019 15:47:33 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Faktöriyel Hesabını Rekürsif Hesaplayan Prosedür]]></category>
		<category><![CDATA[Rekürsif Prosedürler]]></category>
		<category><![CDATA[SQL Server’da Faktöriyel Hesabını Rekürsif Hesaplayan Prosedür]]></category>
		<guid isPermaLink="false">http://sqlserveregitimleri.com/?p=6751</guid>

					<description><![CDATA[Herkese merhaba, Bu bölümde SQL Server&#8217;da faktöriyel hesabını rekürsif hesaplayan bir prosedür örneği yapacağım. İlk önce faktöriyel nedir ona değinelim. 1&#8217;den başlayarak belirli bir sayma...]]></description>
										<content:encoded><![CDATA[<p>Herkese merhaba,</p>
<p>Bu bölümde SQL Server&#8217;da faktöriyel hesabını rekürsif hesaplayan bir prosedür örneği yapacağım.</p>
<p>İlk önce faktöriyel nedir ona değinelim.</p>
<p>1&#8217;den başlayarak belirli bir sayma sayısına kadar olan sayıların çarpımına o sayının faktöriyeli denir.</p>
<p><span class="">Örneğin 5&#8217;in faktöriyel (5! ile gösterilir) :  120 =5 * 4 * 3 * 2 * 1’dir.</span></p>
<p><strong>Rekürsif nedir? </strong></p>
<p>Bir yapı eğer kendine gönderme yapma özelliğine sahipse böyle yapılara rekürsif yapılar denir.</p>
<p>Şimdi kod örneğine geçelim.</p>
<pre class="line-numbers"><code class="language-sql">CREATE PROCEDURE FaktoriyelHesapla
(
    @Sayi INTEGER,
    @Sonuc INTEGER OUTPUT
)
AS
DECLARE @Giris INTEGER;
DECLARE @Cikis INTEGER;
IF @Sayi != 1
BEGIN
    SELECT @Giris = @Sayi - 1;
    EXEC FaktoriyelHesapla @Giris, @Cikis OUTPUT;
    SELECT @Sonuc = @Sayi * @Cikis;
END;
ELSE
BEGIN
    SELECT @Sonuc = 1;
END;
RETURN; 

--Çalıştırılması 

DECLARE @Sonuc INTEGER;
EXEC FaktoriyelHesapla @Sayi = 5,              -- integer 
                       @Sonuc = @Sonuc OUTPUT; -- integer 
PRINT @Sonuc;</code></pre>
<p>Yukarıdaki prosedürü oluşturup çalıştırdığınızda aşağıdakine benzer bir sonuç göreceksiniz.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-13196 size-full" src="https://sqlserveregitimleri.com/wp-content/uploads/2019/07/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-prosedur-1-1.jpg" alt="SQL Server’da Faktöriyel Hesabını Rekürsif Hesaplayan Prosedür" width="700" height="446" srcset="https://sqlserveregitimleri.com/wp-content/uploads/2019/07/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-prosedur-1-1.jpg 700w, https://sqlserveregitimleri.com/wp-content/uploads/2019/07/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-prosedur-1-1-315x201.jpg 315w, https://sqlserveregitimleri.com/wp-content/uploads/2019/07/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-prosedur-1-1-471x300.jpg 471w, https://sqlserveregitimleri.com/wp-content/uploads/2019/07/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-prosedur-1-1-212x135.jpg 212w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>Görüldüğü üzere rekürsif olarak faktöriyel hesabını yapmış olduk.</p>
<p>Herkese çalışma hayatında ve yaşamında başarılar kolaylıklar.</p>
<div class='epvc-post-count'><span class='epvc-eye'></span>  <span class="epvc-count"> 617</span><span class='epvc-label'> Kez Okundu</span></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
