|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using PM of two tables as a PM of third table
I want to use the Primary keys of two tables say Tb1 and Tb2 in a table Tb3, such that the combination of the Primary Keys of Tb1 and Tb2 will be the primary key of the table Tb3. Please guide me here.
|
|
#2
|
|||
|
|||
|
Code:
create table pk1(c1 int primary key,<...>) create table pk2(c2 int primary key,<...>) create table fk1(c1 int references pk1, c2 int references pk2, primary key(c1,c2)) |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Using PM of two tables as a PM of third table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|