我有一个包含3个字段的表:
id
note
created_at
Run Code Online (Sandbox Code Playgroud)
有没有办法在SQL语言特别是Postgres中我可以选择最后一个的值note而不必LIMIT 1?
正常查询:
select note from table order by created_at desc limit 1
Run Code Online (Sandbox Code Playgroud)
我对避免限制的事情感兴趣,因为我需要它作为子查询.