WITH [temp] AS
(SELECT ROW_NUMBER() OVER (ORDER BY id ASC) AS ROWID, * FROM Category)
SELECT * FROM [temp] WHERE id =4
其中temp表存放在哪里呢?,为什么
这个:WITH [temp] AS
(SELECT ROW_NUMBER() OVER (ORDER BY id ASC) AS ROWID, * FROM Category)不能单独执行呢?
SELECT * FROM [temp] WHERE id =4 不就是一个简单的查询语句么,为什么没有它,上面的那句sql就执行报错呢? |