employer cover photo
employer logo
employer logo

Logistics Health Incorporated

Est-ce votre entreprise ?

Question d’entretien chez Logistics Health Incorporated

Write an SQL statement to join 2 tables together

Réponse à la question d'entretien

Utilisateur anonyme

11 mai 2010

The answer depends on the DB schema, but the gist of it is, if you have TableA with columns C1, C2, and C3 and TableB with columns C4, C5, and C6, and you want to make sure that your join returns only the rows where the values in TableA.C3 are equal to the values in TableB.C5, then the join will look like this: SELECT * FROM TableA JOIN TableB ON (TableA.C3 = TableB.C5); That's about as generic as it can be, There are several different kinds of joins and syntaxes, but this is the idea.