In a table I have news posts with these fields:
- Title
- Content
- OwnerID
And a users table
- ID
- Name
- Surname
The OwnerID relates to the ID in the users table, how can I get the name of the user who’s ID matches the OwnerID?
I’m writing a website in ASP.net (VB).
You would need to join the two tables together like this:
This query has no
whereclause to filter the results that are returned so this query would return all users who are associated with anewsrecord. If you wanted to find users associated with a specific news record you would need to filter on the news title or content like this: