Update primary key & Foreign key

Update primary key & Foreign key

Post by Vladimir Lubenchenk » Fri, 09 Feb 2001 04:24:48



Hello All,

    I've read in the Book "Using Microsoft SQL Server 7.0" by Stephen
Wynkoop :
"When there is a table which  has the limitation PIMARY KEY and the
significances of colsupdate, then the cols in another table update
automatically, if there is there is the limitation FOREIGN KEY in this
table"
    When I try to change the value in the col of key field, I get error.

    Why?

Thank's

Yours sincerely
Vladimir Lubenchenko

ICQ: 53906951

begin 666 Lubenchenko Vladimir Nikolayevish.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DQU8F5N8VAE;FMO.U9L861I
M;6ER.TYI:V]L87EE=FEC:#M,5DX-"D9..DQU8F5N8VAE;FMO(%9L861I;6ER
M($YI:V]L87EE=FES: T*3DE#2TY!344Z0F]B#0I414P[2$]-13M63TE#13HS

M-CM!;&-H979S:R!;06QC:&5V<Y)K73M,=6AA;G.2:V$[.30R,#8[56MR86EN
M90T*3$%"14P[2$]-13M%3D-/1$E.1SU154]4140M4%))3E1!0DQ%.G-T<BY-


M.TE.5$523D54.FQV;D!B87IA<BYN970-"E)%5CHR,# Q,#(P-U0Q.3(S,S!:

`
end

 
 
 

Update primary key & Foreign key

Post by Dejan Sark » Thu, 08 Feb 2001 21:04:18


Vladimir,

Quote:>     I've read in the Book "Using Microsoft SQL Server 7.0" by Stephen
> Wynkoop :
> "When there is a table which  has the limitation PIMARY KEY and the
> significances of colsupdate, then the cols in another table update
> automatically, if there is there is the limitation FOREIGN KEY in this
> table"
>     When I try to change the value in the col of key field, I get error.

>     Why?

if it is really written in the book, then it is wrong. It is SQL Server 2000
that allows cascading referential integrity actions, version 7.0 implements
only disallow integrity.

HTH,
Dejan Sarka

 
 
 

1. Update primary keys and foreign keys

Hello All,

I have two tables, parent and child.  The parent table includes 5 primary
keys and the child table contains a composite key.   When I try to update
some primary keys or foreign keys in both tables, I got following error
massages:

 "UPDATE statement conflicted with TABLE FOREIGN KEY constraint"

"UPDATE statement conflicted with TABLE REFERENCE KEY constraint"

Is it possible to update the primary keys in the parent table and the
corresponding foreign keys in the child table?

Thank you very much!

Jean

2. Logins and Users Transfer?

3. Replication with Primary Keys & Foreign Keys Schema

4. LessSpace???

5. Primary Key & Foreign Keys

6. Updating a record using multiple tables

7. Foreign Keys & Primary Keys

8. AIX & SYBASE

9. foreign key w/o foreign/primary key

10. update primary key [aid] to identity(300,1) Primary key

11. Foreign Key as subset of Primary Key

12. Identification of a primary key/foreign key