I have a user table and a presentation table that lists some user IDs ... They look something like this:
Users
User_ID | Name | Age | ...
555 John Doe 35
556 Jane Doe 24
557 John Smith 18
View_Table
User_ID
555
557
Now when I run the query to retrieve the user:
SELECT User_ID, Name, Age FROM Users WHERE User_ID = 555
SELECT User_ID, Name, Age FROM Users WHERE User_ID = 556
I would also like to select a boolean, indicating if the user I'm retrieving is present in View_Table.
Result:
User_ID Name Age In_View
555 John Doe 35 1
556 Jane Doe 24 0
Any help would be greatly appreciated. Efficiency is a huge plus. Thank!!
source
share