Ok lets see if I can put this in words. I have 2 tables, with like data. They are meant to serve as Stock data for the rest of the system to use. One of the tables is a recent addition, and 2 columns worth of data on said table need to match the data on the other tables so I can attempt to make faster running queries. That said. The columns I need to fix have very similar data to that of the one I want it to be like. As in I could do a select query from the second table onto the first one using like and actually get the data I want, but I can’t do that in reverse.
So Heres what I want to know if its even possible just doing it query based. Essentially I want to run over the second table that I want 2 columns of data to match that of the one in the first table. They are varchar columns, as whats in them are just strings. But using sports I guess as an example in the first table I have:
New York Giants
New England Patriots
in the Second table I have:
Patriots
Giants
And while this query is going on I want to update the rows in the second column to match the data in the first table. Is this possible just query based alone or is this something I have to come up with some level of server side logic to over come?
In one table I am working with about 4000 rows in the other I am working with 1001, not sure if that helps any but worth mentioning.
Log into your database with the mysql commandline client and select the database. Then type in something like:
Which will output the definition of the table config. Copy it and add it to your question:
Do that for your two tables.
Then also get some exemplary data for these tables, like:
Which you then can copy and paste again:
That should make it more concrete what you are asking about, at least the existing data. Then try to formulate the outcome you would like to achieve, best with a similar layout.