Last active
August 29, 2015 14:19
-
-
Save vinbarnes/653e648c5215f18cf45f to your computer and use it in GitHub Desktop.
SQL Antipatterns
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 accounts ( | |
| account_id integer NOT NULL primary key, | |
| account_name character varying(20), | |
| first_name character varying(20), | |
| last_name character varying(20), | |
| email character varying(100), | |
| portrait_image bytea, | |
| hourly_rate numeric(9,2) | |
| ); | |
| CREATE SEQUENCE accounts_id_seq | |
| START WITH 1 | |
| INCREMENT BY 1 | |
| NO MINVALUE | |
| NO MAXVALUE | |
| CACHE 1; | |
| ALTER SEQUENCE accounts_id_seq OWNED BY accounts.account_id; | |
| CREATE TABLE bug_status ( | |
| status character varying(20) primary key | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment