SQL Rowcount vs Top

前端 未结 4 1938
礼貌的吻别
礼貌的吻别 2021-01-04 05:39

What is the difference between

Set Rowcount X

And

Select Top X *
From Z

in TSQL?

4条回答
  •  囚心锁ツ
    2021-01-04 06:03

    The main difference is that top will only effect the query you are running while set rowcount will persist with the connection and apply to all queries executed within that connection.

提交回复
热议问题