0
我有這樣的查詢與子查詢as clicks
我想做的事情,然後where clicks > 0
,但我得到一個錯誤,這不是一個公認的列。使用父母嵌套查詢結果WHERE子句
SELECT top 10 *, (select count(*) FROM po_events aeclk WITH(NOLOCK) where (aeclk.[source] = ae.[source]) as clicks
FROM archived_events ae with(NOLOCK)
where clicks > 0
可能重複(http://stackoverflow.com/questions/8370114/referring-to-一列別名在-A-where子句) – Pondlife