﻿<?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 Server’da IDENTITY Kolonuna Değer Atamak &#8211; SQL Server Eğitimleri</title>
	<atom:link href="https://sqlserveregitimleri.com/etiket/sql-serverda-identity-kolonuna-deger-atamak/feed" rel="self" type="application/rss+xml" />
	<link>https://sqlserveregitimleri.com</link>
	<description>SQL Server ile ilgili her şey</description>
	<lastBuildDate>Mon, 13 Mar 2023 22:44:13 +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 IDENTITY Kolonuna Başlangıç Değeri Atamak</title>
		<link>https://sqlserveregitimleri.com/sql-serverda-identity-kolonuna-baslangic-degeri-atamak</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Tue, 31 Oct 2017 14:27:12 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server’da IDENTITY Kolonu]]></category>
		<category><![CDATA[SQL Server’da IDENTITY Kolonuna Başlangıç Değeri Atamak]]></category>
		<category><![CDATA[SQL Server’da IDENTITY Kolonuna Değer Atamak]]></category>
		<guid isPermaLink="false">http://sqlserveregitimleri.com/?p=2288</guid>

					<description><![CDATA[Herkese merhaba, Bu yazıda SQL Server’da IDENTITY kolonuna başlangıç değeri atamak ile ilgili bilgi paylaşacağım. SQL Server&#8217;da tabloda tanımlı identity bir kolon mevcutsa veriler verilen artış...]]></description>
										<content:encoded><![CDATA[<p>Herkese merhaba,</p>
<p>Bu yazıda SQL Server’da IDENTITY kolonuna başlangıç değeri atamak ile ilgili bilgi paylaşacağım.</p>
<p>SQL Server&#8217;da tabloda tanımlı identity bir kolon mevcutsa veriler verilen artış miktarına göre artar. Herhangi bir kayıt silindiğinde<strong> </strong>identity<strong> </strong>değeri kaldığı yerden devam eder. Örnek verecek olursak</p>
<ul>
<li>1-1</li>
<li>2-2</li>
<li>3-3</li>
<li>4-4</li>
</ul>
<p>şeklinde kaydımızın olduğunu düşünelim. Biz burada 4. kaydı sildiğimiz ve yeni bir kayıt eklediğimizde bu kayıt şu şekilde olur.</p>
<ul>
<li>1-1</li>
<li>2-2</li>
<li>3-3</li>
<li>5-4</li>
</ul>
<p>4. sıradaki kaydı sildik yenisini ekledik ama identity alanı 5&#8217;ten devam etti.</p>
<p>Böyle durumlarda bu alanı değiştirmek isteyebiliriz ve değiştirmek için şu kodu kullanırız.</p>
<pre class="line-numbers"><code class="language-sql">DBCC CHECKIDENT('dbo.Categories', RESEED, 78);</code></pre>
<p>Bu kodu ekleyip Northwind veritabanında çalıştırdığımız zaman bir sonraki kayıt 79 dan başlar.</p>
<p>Kodu çalıştırıp design alanında veri eklediğimizde aşağıdaki görüntü ile karşılaşırız.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-2291 size-full" src="https://sqlserveregitimleri.com/wp-content/uploads/2017/10/sql-serverda-identity-kolonuna-baslangic-degeri-atamak-1.jpg" alt="SQL Server’da IDENTITY Kolonuna Başlangıç Değeri Atamak" width="700" height="445" srcset="https://sqlserveregitimleri.com/wp-content/uploads/2017/10/sql-serverda-identity-kolonuna-baslangic-degeri-atamak-1.jpg 700w, https://sqlserveregitimleri.com/wp-content/uploads/2017/10/sql-serverda-identity-kolonuna-baslangic-degeri-atamak-1-315x200.jpg 315w, https://sqlserveregitimleri.com/wp-content/uploads/2017/10/sql-serverda-identity-kolonuna-baslangic-degeri-atamak-1-472x300.jpg 472w, https://sqlserveregitimleri.com/wp-content/uploads/2017/10/sql-serverda-identity-kolonuna-baslangic-degeri-atamak-1-212x135.jpg 212w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>Görüldüğü gibi 79 olarak ekleme işlemini yaptı. Yani bizim istediğimiz biçimde 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"> 913</span><span class='epvc-label'> Kez Okundu</span></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
