CorfuVBProgrammer
Programmer
Hello all . . .
I need some help about deleting rown from multiple tables.
Here is the structure
-----------------------------------------------------------
MODELS TABLE
|----------|
PK | mod_aa
|
|
|
|.. PRODUCT TABLE
.|...|------------|
.|...PK | prod_aa----|
.|-->FK | mod_aa.....|
.....................|
.....................|
..-------------------
..|. PHOTOS TABLE
..|. |-----------|
..|. PK | phot_aa
..|->FK | prod_aa
..|
..|
..|. COLORS TABLE
..|. |----------|
..|. PK | col_aa
..|->FK | prod_aa
..|
..|
..|. Dimensions TABLE
..|. |--------------|
..|. PK | dim_aa
..|->FK | prod_aa
WHERE PK = Primary Key AND FK = Foreyn Key
-----------------------------------------------------------
My problem is how to delete records from PRODUCT TABLE that are related with MODELS TABLE and records from Dimensions TABLE, PHOTOS TABLE and COLORS TABLE that are related with the deleted record on PRODUCT TABLE with one QUERY ? ? ?
Thanks . . .
I need some help about deleting rown from multiple tables.
Here is the structure
-----------------------------------------------------------
MODELS TABLE
|----------|
PK | mod_aa
|
|
|
|.. PRODUCT TABLE
.|...|------------|
.|...PK | prod_aa----|
.|-->FK | mod_aa.....|
.....................|
.....................|
..-------------------
..|. PHOTOS TABLE
..|. |-----------|
..|. PK | phot_aa
..|->FK | prod_aa
..|
..|
..|. COLORS TABLE
..|. |----------|
..|. PK | col_aa
..|->FK | prod_aa
..|
..|
..|. Dimensions TABLE
..|. |--------------|
..|. PK | dim_aa
..|->FK | prod_aa
WHERE PK = Primary Key AND FK = Foreyn Key
-----------------------------------------------------------
My problem is how to delete records from PRODUCT TABLE that are related with MODELS TABLE and records from Dimensions TABLE, PHOTOS TABLE and COLORS TABLE that are related with the deleted record on PRODUCT TABLE with one QUERY ? ? ?
Thanks . . .