.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

What is Identity?

Posted By :Dhivakaran     Posted Date :October 19, 2010    Points :10   Category :Sql Server 
Identity (or AutoNumber) is a column that automatically generates numeric values. A start and increment value can be set, but most DBA leave these at 1. A GUID column also generates numbers; the value of this cannot be controlled. Identity/GUID columns do not need to be indexed

You can also find related Interview Question to What is Identity?  below: 

More than one IDENTITY column per table can be exist in SQL Server . (True /False)

  
False.
There can only be one IDENTITY column per table in SQL Server.
Its auto Incremented Column defined by the user. (More...)

what is @@IDENTITY

  
Is a system function that returns the last-inserted identity value (More...)

what is @@identity in sqlserver?

  
@@Identity returns the last identity value inserted in any table or session of the database (More...)

Can we insert a value for the identity Column in Sql Server?

  
Yes, We can insert the value for Identity column

using SET IDENTITY INSERT ON

e-g


CREATE TABLE #Temp(ID INT IDENTITY, EmpName VARCHAR(255))

SET IDENTITY_INSERT #Temp ON
INSERT INTO #Temp(ID, EmpName)
Values(10, 'Alwyn Duraisingh.M')
SET IDENTITY_INSERT #Temp OFF
(More...)

What is Identity?

  
Identity (or AutoNumber) is a column that automatically generates numeric values. A start and
increment value can be set, but most DBA leave these at 1. A GUID column also generates numbers,the value of this cannot be controled. Identity/GUID columns do not need to be indexed. (More...)

What is an identity?

  
? Identity (or AutoNumber) is a column that automatically generates numeric values.
? A start and increment value can be set, but most DBA leave these at 1.
? A GUID column also generates numbers; the value of this cannot be controlled.
? Identity/GUID columns do not need to be indexed.
(More...)

Database: State Can an Identity column be index?

  
No, Identity and GUID column do not need to be indexed. (More...)

Database: Define Identity Column?

  
Identity column is a column that automatically generates numeric values. Start and increment value are the two properties of prior importance that need to be set with respect to Identity column. Value of this column is mostly used to identify each row uniquely (More...)

Can Delete can reset the identity column?

  
No, It cannot reset the identity columns. (More...)

What is identity column in SQL server

  
The IDENTITY columns are auto incrementing columns provided by SQL Server.
There can only be one IDENTITY column per table.
SQL Server will take care of incrementing this column automatically

Syntax:
CREATE TABLE Contacts (
ContactID INT IDENTITY(1, 1),
FirstName VARCHAR(30),
LastName VARCHAR(30),
Phone VARCHAR(16)

) (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend