WITH cte (wt, cmd, lt ) AS
(SELECT lastwaittype lt, waittime wt, cmd cd FROM sysprocesses)
SELECT * FROM cte
So, we have a CTE with named fields, but then the expression within has named fields. So what happens?
Yup! The CTE overrides what's in the expression. It makes sense, certainly, but at the same point not really what I expected.
1 comment:
Post a Comment