Jump to content

Archived

This topic is now archived and is closed to further replies.

JustinK101

Pointers In MySQL? Possible?

Recommended Posts

Is it possible to have a field in mysql that simply points to another field in a completely different table?

So, for example:

table1
field: first_name | varchar(50)

table2
field: first_name | table1.first_name

That way when the field in the other table gets modified the field in the new table gets updated automatically. This would be very useful for me. Thanks!

Share this post


Link to post
Share on other sites
I'm unsure why you would want to do something like that. Storing the same data in 2 places means that your database isn't normalized.

However, you could create a VIEW that would meet your criteria.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.