This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Auto fill in mysql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Auto fill in mysql" Watch "Auto fill in mysql" New topic

Auto fill in mysql

Namnai Kidorkar

Joined: Jul 02, 2005
Posts: 25
say i've two tables. they both have 2 columns in common. Is there anyway, that each time i update those two columns in table one, table two gets updated as well? how about updating with different informatin such as lengh of table 1 column 1 goes to table2 column 1. thanks in advanced.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

You could do this with triggers. Alternatively, if you have shared data you could store this in a seperate table and refer to it from each existing table.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
It is sorta covered in the JavaRanch Style Guide.
subject: Auto fill in mysql
Similar Threads
Add an editable row to an non editable JTable
Runtime Creating Tables
MySQL table joining
Nested Tables and Colspan attribute
How to create dynamic rows and columns in HTML tables