Author |
Topic |
diwakar_m
Starting Member
19 Posts |
Posted - 2008-05-14 : 07:18:34
|
Say I have a table with two columnsTABLE_A ( col1 INT IDENTITY(1,1) , col2 VARCHAR(10) )Now i insert some values into this table.AAABBBCCCDDDThe table would like this1 , AAA2 , BBB3 , CCC4 , DDDNow if i delete a row. Say for example 3rd row. The result would be 1 , AAA2 , BBB4 , DDDIs there any way to reset this to1 , AAA2 , BBB3 , DDDSorry for being prolix.Thanks in advance. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-05-14 : 07:23:02
|
No.And why should you? E 12°55'05.25"N 56°04'39.16" |
 |
|
diwakar_m
Starting Member
19 Posts |
Posted - 2008-05-14 : 07:29:36
|
Well it is the business requirement. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-05-14 : 07:37:18
|
Then the business needs to relearn.Has also the IDENTITY column a foreign key/primary key contraint? E 12°55'05.25"N 56°04'39.16" |
 |
|
diwakar_m
Starting Member
19 Posts |
Posted - 2008-05-14 : 07:39:42
|
Yes the identity column is a primary key |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-14 : 07:54:12
|
quote: Originally posted by diwakar_m Yes the identity column is a primary key
can you specify what is the exact requirement that's prompting you for this? |
 |
|
diwakar_m
Starting Member
19 Posts |
Posted - 2008-05-14 : 08:02:42
|
It's complicated. Can you please tell me whether it is possible or not? |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-05-14 : 08:35:26
|
Which part in the response I gave 05/14/2008 : 07:23:02 did you not understand?Please describe what knowledge you lack and I can fill them in for you. E 12°55'05.25"N 56°04'39.16" |
 |
|
diwakar_m
Starting Member
19 Posts |
Posted - 2008-05-14 : 08:42:11
|
quote: Originally posted by Peso Which part in the response I gave 05/14/2008 : 07:23:02 did you not understand?Please describe what knowledge you lack and I can fill them in for you. E 12°55'05.25"N 56°04'39.16"
Now i see why are being too arrogant. Just because you are an SQL guru doesn't entitle you with clumsy handling of freshers questions. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-05-14 : 08:45:20
|
I am not a Guru. I am a Patron Saint of Lost Yaks. E 12°55'05.25"N 56°04'39.16" |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-14 : 10:02:57
|
quote: Originally posted by diwakar_m It's complicated. Can you please tell me whether it is possible or not?
Before that can you post what's the requirement thats prompting you for doing this? |
 |
|
cat_jesus
Aged Yak Warrior
547 Posts |
Posted - 2008-05-16 : 17:52:28
|
quote: Now i see why are being too arrogant
Is that more arrogant than assuming your business requirements are too complicated for us to understand?quote: Can you please tell me whether it is possible or not?
I will answer your question. Yes it's possible. It's also possible to pop your eyeball out with a spoon. In both cases we are forced to ask, why would you want to?An infinite universe is the ultimate cartesian product. |
 |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-05-16 : 21:19:22
|
quote: Originally posted by diwakar_m It's complicated. Can you please tell me whether it is possible or not?
What he's telling you is that it is stupid. Renumbering a surrogate key is one of the hallmarks of noob DBAs. He's giving you the opportunity to bypass that mistake. Take it.e4 d5 xd5 Nf6 |
 |
|
|