Please update your Flash Player to view content.

Online Users

1 users and 54 guests online

Tech Star

Weekly Toppers

Monthly Winners

  • images/stories/gifts/Gouthmi.jpg
  • images/stories/gifts/Mahesh.jpg
  • images/stories/gifts/Naresh.jpg
  • images/stories/gifts/Nithin.jpg
  • images/stories/gifts/Sravya.jpg
  • images/stories/gifts/Subramanyam.jpg
  • images/stories/gifts/Usha.jpg
  • images/stories/gifts/gajavelly.jpg

Top Earners

Daily Toppers

Last Points Earned

Tech Shatabdhi Radio


Birthday Techies

Latest Updates

Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Interview Experiences module Added


Weekly toppers, star of the day modules added.


Added 100% compatibility to all mobile phones


Certificates and points sent to August Winners.


Win A Weekly Video Library Contest Started


Welcome, Guest
Please Login or Register.    Lost Password?

Setting Identity to a Column of a Table in sql
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Setting Identity to a Column of a Table in sql
#12485
Setting Identity to a Column of a Table in sql 10 Months, 3 Weeks ago Karma: 0
Hi friend,

I have a table Called Test which have 3 Column and already that table has some data.
Design of table is like this :

Fields datatype Allow null
------------------------------
ID int notnull
Name varchar null
Age int null

At the time of Creation of Table I forgot to set Identity to my ID column and I fill lot of data manually. Now I want to set Identity to my ID column. Can you please help me how to do that.
sharma.dhiraj87 (User)
Fresh Boarder
Posts: 14
graphgraph
Points: 17315
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#12486
Re:Setting Identity to a Column of a Table in sql 10 Months, 3 Weeks ago Karma: -1
You can create one more new table with identity column set to ID and import old table.
kumar (User)
Gold Boarder
Posts: 262
graphgraph
Points: 189486
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#12487
Re:Setting Identity to a Column of a Table in sql 10 Months, 3 Weeks ago Karma: 0
Thanks, For your reply. Can you please give a small example code for me, so that it will me more clear.
Thanks
sharma.dhiraj87 (User)
Fresh Boarder
Posts: 14
graphgraph
Points: 17315
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#12518
Re:Setting Identity to a Column of a Table in sql 8 Months, 3 Weeks ago Karma: 0
Late reply
Code:


CREATE TABLE tbl (
ID INT not null,
Name VARCHAR null,
Age INT null
)
GO

INSERT INTO tbl 
SELECT 1 , 'A' , 25 UNION ALL
SELECT 2 ,'B' , 26 UNION ALL
select 3 , 'C' , 26
GO

select 'WITH OUT IDENTITY' FLAG, * from tbl 
GO

SELECT ID=IDENTITY(INT,1,1) , Name , Age 
INTO TBL1
From tbl 
GO

DROP TABLE tbl
GO

EXEC sp_rename 'TBL1' , 'tbl'
GO

SELECT 'WITH IDENTITY' FLAG,* FROM tbl 
GO

email2bag (User)
Fresh Boarder
Posts: 5
graphgraph
Points: 6248
graphgraph
User Offline Click here to see the profile of this user
Gender: Male email2bag
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: chandu, harihara.muvvala, usham
Your online TV