Help with SQL Join on two tables

Posted by bladefist on Stack Overflow See other posts from Stack Overflow or by bladefist
Published on 2010-03-17T01:53:38Z Indexed on 2010/03/17 2:01 UTC
Read the original article Hit count: 363

Filed under:
|

I have two tables, one is a table of forum threads. It has a last post date column.

Another table has PostID, UserId, and DateViewed.

I want to join these tables so I can compare DateViewed and LastPostDate for the current user. However, if they have never viewed the thread, there will not be a row in the 2nd table.

This seems easy but I cant wrap my head around it. Advice please.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about sql

Related posts about joins