.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 column in SQL server

Posted By :volvo     Posted Date :November 11, 2013    Points :40   Category :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)

)

You can also find related Interview Question to What is identity column in SQL server  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...)

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...)

how to find column name from sql server table?

  
select * from INFORMATION_SCHEMA.Columns where column_name like 'colname%' (More...)

What is maximum column name length in SQL Server 2005?

  
Maximum allowed column name length in SQL Server 2005 is 128 characters (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...)

Database Concurrency in Sql Server.

  
When two or more user try to update same type of data in a table then Database Concurrency helps in this situation.

There are 2 types of Database Concurrency

Pessimistic: When one user try to change the data with pessimistic concurrency then a lock is placed on the data in a table so that another user cannot change data. when one user finishes then other user can able to change.

Optimistic: When two user works on the same data in a table and one change that data first then second user cannot change that same data becasue the which he have using is allready changed so he cannot do the change becasue change apply to another data that is changed by first user. (More...)

Is it true that COM objects no longer need to be registered on the server?

  
Yes and No. Legacy COM objects still need to be registered on the server before they can be used. COM developed using the new .NET Framework will not need to be registered. Developers will be able to auto-register these objects just by placing them in the 'bin' folder of the application. (More...)

What are server controls?

  
ASP.NET server controls are components that run on the server and encapsulate user-interface and other related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes. (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