SQL Server 2000 TOP and OUTPUT keywords
问题 This query works great in SQL Server 2005 and 2008. How would I write it in SQL Server 2000? UPDATE TOP 10 myTable SET myBooleanColumn = 1 OUTPUT inserted.* Is there any way to do it besides running multiple queries? 回答1: To be honest, your query doesn't really make sense, and I have a hard time understanding your criteria for "great." Sure, it updates 10 rows, and doesn't give an error. But do you really not care which 10 rows it updates? Your current TOP without ORDER BY suggests that you