Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

How to update Junction Table

$
0
0

I have trigger setup on the sql server end, which inserts data into the tables products and prices, however my junction table 'Product_Prices', is not automatically updating with the records, when the trigger is executed. 

Here is my database table schema:

Products
(
Product_id [pk]
Product
type
UploadDate
)Prices
(
Price_id [pk]
price
uploadDate
)Product_Prices
(
Product_id REFERENCE Products (Product_id)
price_id REFERENCE prices (price_id)
Foiergn KEY (Product_id, price_id)
Note
)

Is my structure incorrect or am I missing something?

Please advice. 

Many thanks for your time and help. 


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>