Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all;

I am working on visual studio 2010 and sql express database.
I have 3 tables in database, these are;

1. ehs_A columns are id_A, name (id has primary key and auto increment)

2. ehs_B columns are id_B, age (id has primary key and auto increment)

3. ehs_main columns are id_Main, id_A, id_B (id_Main has primary key and auto increment)(id_A, id_B is other tables primery keys)

how can i update the main table when i insert data to other tables.

Best Regards
Aykut
Posted
Comments
Shemeer NS 12-Jul-12 5:37am    
why you need to update main table when you update other tables as you only have id field of other table in main table , so when you update other tables the autoincriment id is not going to change.. give more details for better understanding...

1 solution

you can update main table using sql trigger
 
Share this answer
 
Comments
Member 8654985 12-Jul-12 3:15am    
no i didnt. i made update rule cascade but it doesnt work

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900