Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Auto update SQL table entries using foreign keys

$
0
0

Hello,

I am using Microsoft SQL server 2008. I have 2 SQL tables Table 'Product1' and Table 'Product2'. In 'Product1' Table I have columns named

1.SLNO,

2.Name,

3.Place

4.State

And 'Product2' have columns named,

1.SLNO,

2.Name,

3.Place

4.State

5.regno

here SLNO (of product1 table ) =  regno.

My requirement is to update the column in 'Product2' table when I modify data in 'Product1' table ( 'name' 'Place' and 'state' column).

Is it possible to update 'Product2' table without running individual queries for each rows ?

If yes how to do this ?

Please help.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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