SELECT * FROM users A INNER JOIN (SELECT * FROM [BASE].[dbo].[list]) AS B ON A.idname = B.user_id Displays remarkably 2 tables.
Purpose: table 1 contains user data (name, year of birth, etc.), and the list table contains only the identifiers of these users, I cannot connect the third table so that the list is from the list and list1 tables, but the data is from users.
Data in the user table:
idname surname name patronymic age
pupkin65 Pupkin Ivan Ivanovich 1965
vasukov63 Vasyukov Peter G. 1963
permskii63 Permsky Denis Gregoryevich 1961
moskva64 Moscow Sergey Ivanovich 1964
list1
user_id
moskva64
vasukov63
list
user_id
pupkin65
permskii63
vasukov63
you need to display the data as in the users table, but only those in the list and list1 table