Created
August 1, 2013 14:09
-
-
Save hagbarddenstore/6131700 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * | |
| FROM "Users" | |
| LEFT JOIN "Administrators" AS a ON "Users".Id = "Administrators".UserId |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE "Users" | |
| ( | |
| "Id" UUID NOT NULL, | |
| "Username" VARCHAR(255), | |
| "Password" BYTEA, | |
| "Firstname" VARCHAR(255), | |
| "Lastname" VARCHAR(255), | |
| "CreatedOn" TIMESTAMP, | |
| PRIMARY KEY ("Id") | |
| ); | |
| CREATE TABLE "Administrators" | |
| ( | |
| "UserId" UUID NOT NULL, | |
| PRIMARY KEY ("UserId") | |
| ); | |
| ALTER TABLE "Administrators" ADD CONSTRAINT "Administrators_UserId" FOREIGN KEY ("UserId") REFERENCES "Users"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment