| Author |
Topic  |
|
|
sunsanvin
Flowing Fount of Yak Knowledge
India
1256 Posts |
Posted - 05/14/2007 : 03:05:02
|
Dear Folks, I've two tables,(table014,table015) column01 of table014 is a primary key, and column04 is the foriegnkey. column02 of table015 is also foriegn key.
how can i update column01 of table014?
actually I've done this through enterprise manager, by disabling the enforcement of constraints.
how can i do this by using query? and what is the correct way of doing this?
thank you verymuch
Vinod Even you learn 1%, Learn it with 100% confidence. |
|
|
sunsanvin
Flowing Fount of Yak Knowledge
India
1256 Posts |
Posted - 05/14/2007 : 04:36:52
|
Friends, I"m sorry, if i didn't provide proper information for you.
the column01 of table014 is a primary key , column004 of table014 and column02 of table015 are the foriegn keys. please tell me the correct way how can i update column01 of table014?
Vinod Even you learn 1%, Learn it with 100% confidence. |
 |
|
|
LoztInSpace
Aged Yak Warrior
876 Posts |
Posted - 05/14/2007 : 04:43:54
|
You should not update primary keys. Arguably immutability is one of the primary things about them. You should
begin transaction add a dummy row to table014 with your new PK update column 2 of 15 to new PK update column 4 of 14 to new PK delete using original PK from 14 commit.
And then go through your data model and fix it up so it has proper primary keys and proper table/column names.
|
 |
|
|
Kristen
Test
United Kingdom
22191 Posts |
Posted - 05/14/2007 : 05:11:01
|
"table014 table015"
Scary table names ...
... Table1 and Table2 I could have believed were "example names", 014 and 015 don't sound like examples though ...
Kristen |
 |
|
|
sunsanvin
Flowing Fount of Yak Knowledge
India
1256 Posts |
Posted - 05/15/2007 : 02:22:03
|
no no kiristen there are code names for our team, for each module, the suffix and prefix will change. we are very clear with this
Vinod Even you learn 1%, Learn it with 100% confidence. |
 |
|
|
sunsanvin
Flowing Fount of Yak Knowledge
India
1256 Posts |
Posted - 05/15/2007 : 05:09:02
|
quote: Originally posted by LoztInSpace
You should not update primary keys. Arguably immutability is one of the primary things about them. You should
begin transaction add a dummy row to table014 with your new PK update column 2 of 15 to new PK update column 4 of 14 to new PK delete using original PK from 14 commit.
And then go through your data model and fix it up so it has proper primary keys and proper table/column names.
I didn't get you. how can i take another primary key?
Vinod Even you learn 1%, Learn it with 100% confidence. |
 |
|
| |
Topic  |
|