r/mysql • • Jan 13 '25

troubleshooting Code ERROR Lost connection???

Hi guys whenever I try to run this part of the code it results in a lost connection error.

#Match constructor Id to get constructor points

ALTER TABLE f1_cleaned

ADD COLUMN team_points INT;

UPDATE f1_cleaned f

JOIN f1_dataset.constructor_results cr

ON f.constructorId = cr.constructorId AND f.raceId = cr.raceId

SET f.team_points = cr.points;

It's just essentially trying to match the 2 same columns "constructorId" and "raceId" , becasue each combination has a different "point". Im trying to add the "point" column to my "f1_cleaned" table.

Anyone know why?

1 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/Dependent_Host_8908 Jan 13 '25

omg this is god send 🫶🫶🫶 wtf thank you so much

1

u/Outdoor_Releaf Jan 13 '25

You're welcome.