Skip to content

Instantly share code, notes, and snippets.

@olalonde
Last active December 18, 2015 13:29
Show Gist options
  • Save olalonde/5790720 to your computer and use it in GitHub Desktop.
Save olalonde/5790720 to your computer and use it in GitHub Desktop.
SELECT "persons".* FROM "persons"
INNER JOIN "passports" AS "passport"
ON ("persons"."passport_id" = "passport"."id") , "persons"
INNER JOIN "persons" AS "bestFriend"
ON ("persons"."bestfriend_id" = "bestFriend"."id")
WHERE ("persons"."name" = $1) LIMIT 1
{ [Error: table name "persons" specified more than once]
severity: 'ERROR',
code: '42712',
file: 'parse_relation.c',
line: '344',
routine: 'checkNameSpaceConflicts' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment