Skip to content
Advertisement

SQL query to get all data for a particular user

I have two tables:

Users (idk, surnamek, namek, logink),

Measurements (idm, date, weight, #idk)

I need to create a query to get all measurements for a particular logink.

Advertisement

Answer

use inner join:

SELECT m.* FROM Measurements AS m INNER JOIN Users AS u ON u.idk = m.idk WHERE u.logink = ###;
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement