At the moment I have a table called posts which looks like this:
Code: Select all
post_id | content | created_date | created_by | updated_date | update_by
---------------------------------------------------------------------------------
1 | .... | 123456789 | 1 | 234567891 | 2
2 | .... | 345678912 | 1 | 456789123 | 2
3 | .... | 567891234 | 2 | 456789123 | 1I am looking to, in one query, get when the thread was last updated, either through the creation date or the last updated date. The only way I can think of doing this is rather evil, having two subqueries finding the MAX created_date and the MAX updated_date and then doing an:
Code: Select all
IF created_max > updated_max THEN ......Thanks for your help and ideas!