How universal is the LIMIT statement in SQL?

前端 未结 7 1896
予麋鹿
予麋鹿 2020-12-03 14:21

I\'m in the process of generalizing a Django DB replication app and it uses the statement:

SELECT %s FROM %s LIMIT 1

to fetch 1 row and use

7条回答
  •  清歌不尽
    2020-12-03 14:50

    LIMIT is very far from universal - out of major RDBMS, it's pretty much restricted to MySQL and PostgreSQL. Here is a detailed analysis of how this is done in many other implementations, including MSSQL, Oracle and DB2, as well as in ANSI SQL.

提交回复
热议问题