Difference between Top and Limit Keyword in SQL

后端 未结 6 1415
你的背包
你的背包 2020-11-27 04:41

A quick Question. Suppose I have the following two queries:

SELECT TOP 2 * FROM Persons;

and

SELECT * FROM Persons limit 2;         


        
6条回答
  •  执笔经年
    2020-11-27 05:17

    limit works on MySQL and PostgreSQL, top works on SQL Server, rownum works on Oracle.

提交回复
热议问题