Skip to content

Instantly share code, notes, and snippets.

@jnwelzel
Last active January 2, 2016 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnwelzel/8298854 to your computer and use it in GitHub Desktop.
Save jnwelzel/8298854 to your computer and use it in GitHub Desktop.
Since I suck at SQL, here are a few notes and reminders if ever my memory fails me (and it always does)
UPDATE table_name
SET column1=value1
WHERE some_column=some_value;
ALTER TABLE table_name
ADD column_name datatype;
/* SQL Server */
alter table DEFAULT_PROPRIED_DOCTO
add VERSION bigint not null default 1;
ALTER TABLE {TABLENAME}
ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL}
CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment