﻿<?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>Foreign Key Alanlarını Listelemek &#8211; SQL Server Eğitimleri</title>
	<atom:link href="https://sqlserveregitimleri.com/etiket/foreign-key-alanlarini-listelemek/feed" rel="self" type="application/rss+xml" />
	<link>https://sqlserveregitimleri.com</link>
	<description>SQL Server ile ilgili her şey</description>
	<lastBuildDate>Mon, 13 Jun 2022 20:14:45 +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 Tüm Tabloların Foreign Key Alanlarını Listelemek</title>
		<link>https://sqlserveregitimleri.com/sql-serverda-tum-tablolarin-foreign-key-alanlarini-listelemek</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Fri, 15 Apr 2022 15:58:22 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Foreign Key Alanları]]></category>
		<category><![CDATA[Foreign Key Alanlarını Listelemek]]></category>
		<category><![CDATA[Tabloların Foreign Key Alanlarını Listelemek]]></category>
		<guid isPermaLink="false">https://sqlserveregitimleri.com/?p=13596</guid>

					<description><![CDATA[Herkese merhaba, Bu yazıda SQL Server&#8217;da tüm tabloların Foreign Key alanlarını listelemek ile ilgili bilgi vermeye çalışacağım. SQL Server&#8217;da bazı durumlarda tabloların Foreign Key alanlarını...]]></description>
										<content:encoded><![CDATA[<p>Herkese merhaba,</p>
<p>Bu yazıda SQL Server&#8217;da tüm tabloların Foreign Key alanlarını listelemek ile ilgili bilgi vermeye çalışacağım.</p>
<p>SQL Server&#8217;da bazı durumlarda tabloların Foreign Key alanlarını listelemek isteyebilirsiniz.</p>
<p>Aşağıdaki kodu kullanarak siz de bu işlemi rahatlıkla yapabilirsiniz.</p>
<pre class="line-numbers"><code class="language-sql">SELECT obj.name AS FK_NAME,
       sch.name AS [schema_name],
       tab1.name AS [table],
       col1.name AS [column],
       tab2.name AS [referenced_table],
       col2.name AS [referenced_column]
FROM sys.foreign_key_columns fkc
    INNER JOIN sys.objects obj
        ON obj.object_id = fkc.constraint_object_id
    INNER JOIN sys.tables tab1
        ON tab1.object_id = fkc.parent_object_id
    INNER JOIN sys.schemas sch
        ON tab1.schema_id = sch.schema_id
    INNER JOIN sys.columns col1
        ON col1.column_id = parent_column_id
           AND col1.object_id = tab1.object_id
    INNER JOIN sys.tables tab2
        ON tab2.object_id = fkc.referenced_object_id
    INNER JOIN sys.columns col2
        ON col2.column_id = referenced_column_id
           AND col2.object_id = tab2.object_id;</code></pre>
<p>Yukarıdaki 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-13598 size-full" src="https://sqlserveregitimleri.com/wp-content/uploads/2022/04/sql-serverda-tum-tablolarin-foreign-key-alanlarini-listelemek-1.jpg" alt="SQL Server’da Tüm Tabloların Foreign Key Alanlarını Listelemek" width="700" height="521" srcset="https://sqlserveregitimleri.com/wp-content/uploads/2022/04/sql-serverda-tum-tablolarin-foreign-key-alanlarini-listelemek-1.jpg 700w, https://sqlserveregitimleri.com/wp-content/uploads/2022/04/sql-serverda-tum-tablolarin-foreign-key-alanlarini-listelemek-1-315x234.jpg 315w, https://sqlserveregitimleri.com/wp-content/uploads/2022/04/sql-serverda-tum-tablolarin-foreign-key-alanlarini-listelemek-1-403x300.jpg 403w, https://sqlserveregitimleri.com/wp-content/uploads/2022/04/sql-serverda-tum-tablolarin-foreign-key-alanlarini-listelemek-1-181x135.jpg 181w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>Görüldüğü üzere tüm tabloların Foreign Key alanları listelenmiş oldu.</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"> 227</span><span class='epvc-label'> Kez Okundu</span></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
