How to Insert Identity Column in Single Field. [Resolved]

Posted by Jayakumars under ASP.NET on 4/10/2013 | Points: 10 | Views : 930 | Status : [Member] [MVP] | Replies : 3
hi

I have single Field as identity Filed in Table how to insert this

Mark as Answer if its helpful to you


Responses

Posted by: Jayakumars on: 4/10/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down

Resolved
hi

i got it.

SET IDENTITY_INSERT [Tb7] ON
INSERT INTO tb7 (EMPID) VALUES(74)
SET IDENTITY_INSERT [Tb7] Off


Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pandians on: 4/10/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
You want to Insert on Identity column manually (or) Automatically on single field with IDENTITY ?

Automatic Insert!
CREATE TABLE Funda1

(
ID INT IDENTITY(1,1)
)
GO

INSERT Funda1 DEFAULT VALUES
GO
What you have used for Manual Insert!

Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 4/10/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
pandiyan i face one interview Question for how to insert identity column so
i put this

Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response