mysql - Update statement with inner join doesn't update -


I need to break into a table 2. The table will have one-to-many relationship with the other.

These hold credits for the table shows. More than one person can have the same role in the show, so I need a roll table, in which there will be multiple relationships with the names of artists (i.e. a group of all people where "residents" are played ).

Then, it will break:

credits_roles - The main table. Credits_names - Artists name (relationship is with id column in credits_roles).

Basically, it was structured in a table. Each line had a different artist and role. This site is causing problems with many questions and this break will make things easier.

I have transmitted data in credits_roll using the INSERT statement and group BY. I have now only unique roles in Credits_roles.

Where I'm having a problem is an UPDATE statement that will look at the ID in the credit_roles and it will be added to credit_name in the credits_roles_id column.

This is what I have.

  Include credit_enames at UPDATE credits_names INNER credits_roles. Ro_id = credits_roles.role_id and credits_names.show_id = credits_roles.show_id and credits_names.credit_class = credits_roles.credit_class SET credits_names.credit_role_id = Credits_roles.id  

credits_names is the original table and currently all data are After completion of this project, some of these will be removed. Right now, I'm going to join on the basis of the role ID (because "townspeople" will get their roles from a different roles table), the show is that they are for credit, and then there is a credit-class (For the artist versus the crew, or in the CA vs. CR table), all these need to be matched to see credit -_rolls.Id.

The problem is that the query is running ... and running ... and running. I run it overnight and it never ends. Credits_Names have 300,000 records but when I stop the query, no updates have been made.

So, my question is, what will I have to change in this question? It looks like a simple update but it's not doing anything or, if this is not a query, then what do I need to do instead?


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -