mirror of https://github.com/django/django.git
Refs #31792 -- Updated SQL example in Exists() docs.
Follow up to 51297a9232
.
This commit is contained in:
parent
00a1d42bf0
commit
45f4282149
|
@ -633,12 +633,13 @@ On PostgreSQL, the SQL looks like:
|
||||||
.. code-block:: sql
|
.. code-block:: sql
|
||||||
|
|
||||||
SELECT "post"."id", "post"."published_at", EXISTS(
|
SELECT "post"."id", "post"."published_at", EXISTS(
|
||||||
SELECT U0."id", U0."post_id", U0."email", U0."created_at"
|
SELECT (1) as "a"
|
||||||
FROM "comment" U0
|
FROM "comment" U0
|
||||||
WHERE (
|
WHERE (
|
||||||
U0."created_at" >= YYYY-MM-DD HH:MM:SS AND
|
U0."created_at" >= YYYY-MM-DD HH:MM:SS AND
|
||||||
U0."post_id" = ("post"."id")
|
U0."post_id" = "post"."id"
|
||||||
)
|
)
|
||||||
|
LIMIT 1
|
||||||
) AS "recent_comment" FROM "post"
|
) AS "recent_comment" FROM "post"
|
||||||
|
|
||||||
It's unnecessary to force ``Exists`` to refer to a single column, since the
|
It's unnecessary to force ``Exists`` to refer to a single column, since the
|
||||||
|
|
Loading…
Reference in New Issue