Click here to Skip to main content
15,887,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

There are two tables which named myTable(id,name,description,type) and myTable2(id,name).
When I add a record to myTable2, I want sql add the new record to table myTable also. How can I relate these two table for this purpose.

Thanks for the replies in advance..
Posted

 
Share this answer
 
Comments
no_-_namee 13-Feb-12 3:24am    
Can you express it in my situation with an example ,please?
SQL
INSERT INTO myTable (id,name)
SELECT id,name
FROM myTable2
 
Share this answer
 
v2

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