先执行后面的select max(adddate) adddate from table where table.title=a.title
如果那样的话,table.title = a.title又怎么解释呢?
我觉得作成这样 select a.title,a.username, a.addDate from table a where adddate=(select Max(adddate) from table where title=a.title) order by a.title
因为我觉得,a表就是table表.所以table.title = a.title我觉得是不是多余?如果先执行后面的select max(adddate) adddate from table where table.title=a.title的话.
拙见:你下面这条语句我怎么认为不能执行呀。你试过吗?select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b 我觉得: select a.title,a.username, a.addDate from table a where adddate=(select Max(adddate) from table where title=a.title) order by a.title 能实现显示文章、提交人和最后回复时间。
select a.title,a.username, a.addDate from table a where adddate=(select Max(adddate) from table where title=a.title) order by a.title
我觉得:
select a.title,a.username, a.addDate from table a where adddate=(select Max(adddate) from table where title=a.title) order by a.title
能实现显示文章、提交人和最后回复时间。