﻿<?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>sql Faktöriyel &#8211; SQL Server Eğitimleri</title>
	<atom:link href="https://sqlserveregitimleri.com/etiket/sql-faktoriyel/feed" rel="self" type="application/rss+xml" />
	<link>https://sqlserveregitimleri.com</link>
	<description>SQL Server ile ilgili her şey</description>
	<lastBuildDate>Tue, 22 Mar 2022 18:34:57 +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&#8217;da Faktöriyel Hesabını Rekürsif Hesaplayan Fonksiyon</title>
		<link>https://sqlserveregitimleri.com/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-fonksiyon</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Tue, 18 Jun 2019 18:09:12 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Faktöriyel Hesabını Rekürsif Hesaplayan Fonksiyon]]></category>
		<category><![CDATA[Faktöriyel hesaplayan sql kodu]]></category>
		<category><![CDATA[sql Faktöriyel]]></category>
		<guid isPermaLink="false">http://sqlserveregitimleri.com/?p=6280</guid>

					<description><![CDATA[Herkese merhaba, SQL Server&#8217;ı hem daha iyi öğrenmek hem de öğrendiklerinizi uygulamak adına bu şekilde örnekler yapacağım. İlk önce faktöriyel nedir ona değinelim. 1&#8217;den başlayarak...]]></description>
										<content:encoded><![CDATA[<p>Herkese merhaba,</p>
<p>SQL Server&#8217;ı hem daha iyi öğrenmek hem de öğrendiklerinizi uygulamak adına bu şekilde örnekler 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 FUNCTION dbo.Faktoriyel
(
    @Sayi INT
)
RETURNS INT
AS
BEGIN
    DECLARE @sonuc INT;
    IF @Sayi &lt;= 1
        SET @sonuc = 1;
    ELSE
        SET @sonuc = @Sayi * dbo.Faktoriyel(@Sayi - 1);
    RETURN (@sonuc);
END;

--Çalıştırılması 

SELECT dbo.Faktoriyel(5) AS Sonuc;</code></pre>
<p>Yukarıdaki fonksiyonu oluşturup kodu çalıştırdığınızda aşağıdakine benzer bir sonuç göreceksiniz.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-13397 size-full" src="https://sqlserveregitimleri.com/wp-content/uploads/2019/06/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-fonksiyon-1-1.jpg" alt="SQL Server'da Faktöriyel Hesabını Rekürsif Hesaplayan Fonksiyon" width="700" height="464" srcset="https://sqlserveregitimleri.com/wp-content/uploads/2019/06/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-fonksiyon-1-1.jpg 700w, https://sqlserveregitimleri.com/wp-content/uploads/2019/06/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-fonksiyon-1-1-315x209.jpg 315w, https://sqlserveregitimleri.com/wp-content/uploads/2019/06/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-fonksiyon-1-1-453x300.jpg 453w, https://sqlserveregitimleri.com/wp-content/uploads/2019/06/sql-serverda-faktoriyel-hesabini-rekursif-hesaplayan-fonksiyon-1-1-204x135.jpg 204w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>Görüldüğü üzere faktöriyel hesabını rekürsif olarak hesaplamış 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"> 411</span><span class='epvc-label'> Kez Okundu</span></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
