MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/4qwupq/learn_postgresql_by_doing/d4x0p4h/?context=3
r/programming • u/sohamkamani • Jul 02 '16
129 comments sorted by
View all comments
Show parent comments
29
what if you only need one
25 u/rMBP Jul 02 '16 LIMIT 1 14 u/snaky Jul 02 '16 In PostgreSQL FETCH FIRST 1 is preferrable since version 8.4 3 u/ryeguy Jul 02 '16 Why is it preferred? It just seems to be a synonym for limit. 4 u/[deleted] Jul 03 '16 [fetch first is ANSI compliant](https://en.wikipedia.org/wiki/Select_(SQL)#FETCH_FIRST_clause).
25
LIMIT 1
14 u/snaky Jul 02 '16 In PostgreSQL FETCH FIRST 1 is preferrable since version 8.4 3 u/ryeguy Jul 02 '16 Why is it preferred? It just seems to be a synonym for limit. 4 u/[deleted] Jul 03 '16 [fetch first is ANSI compliant](https://en.wikipedia.org/wiki/Select_(SQL)#FETCH_FIRST_clause).
14
In PostgreSQL FETCH FIRST 1 is preferrable since version 8.4
3 u/ryeguy Jul 02 '16 Why is it preferred? It just seems to be a synonym for limit. 4 u/[deleted] Jul 03 '16 [fetch first is ANSI compliant](https://en.wikipedia.org/wiki/Select_(SQL)#FETCH_FIRST_clause).
3
Why is it preferred? It just seems to be a synonym for limit.
4 u/[deleted] Jul 03 '16 [fetch first is ANSI compliant](https://en.wikipedia.org/wiki/Select_(SQL)#FETCH_FIRST_clause).
4
[fetch first is ANSI compliant](https://en.wikipedia.org/wiki/Select_(SQL)#FETCH_FIRST_clause).
29
u/[deleted] Jul 02 '16
what if you only need one