vendredi 22 mai 2015

SQL Query Copy values - Beginner

INSERT INTO Odds_display (Team, Odds) SELECT DISTINCT Team1, Odds1 FROM Odds WHERE Team1 = 'Team SoloMid' AND NOT EXISTS (SELECT Team FROM Odds_display)

So, I don't know if Im blind or stupid... Or maybe both! Kind of a beginner to SQL but what Im aiming for here is to copy 2 values from a table and insert them into another table but don't insert any duplicates!

So the table Odds is the "original" table and I want to copy to the Odds_display table and prevent duplicates!

Been searching for solutions here but having a hard time to solve this anyways :(

cheers!

Aucun commentaire:

Enregistrer un commentaire