SQL Server 2000 中是否提供公共表表达式 (CTE)

2021-09-10 00:00:00 tsql sql-server

我最近发现了以下文章:

I recently found the following article:

http://www.tsqltutorials.com/with-common-table-表达式.php

这篇文章没有列出它在哪个版本的 SQL Server 中可用.这在 SQL Server 2000 中是否有效,如果不能,它在哪个版本中可用?

The article doesn't list which version of SQL server this became available in. Does this work in SQL Server 2000 and if not what is the earliest version that it is usable in?

更新:我确实尝试了一个快速测试,但该测试不起作用.我要求它在 SS2000 中不起作用以确保它不是我或我的设置.

Update: I did try a quick test and the test doesn't work. I'm asking that it doesn't work in SS2000 to ensure it isn't me or my setup.

推荐答案

SQL Server 2005 中引入了常用表表达式.

Common table expressions were introduced in SQL Server 2005.

http://www.simple-talk.com/sql/sql-server-2005/sql-server-2005-common-table-expressions/

相关文章