Skip to content

Instantly share code, notes, and snippets.

@thePunderWoman
Last active December 10, 2015 12:49
Show Gist options
  • Save thePunderWoman/4436889 to your computer and use it in GitHub Desktop.
Save thePunderWoman/4436889 to your computer and use it in GitHub Desktop.
SQL Create Table
CREATE TABLE Blah (
ID int IDENTITY(1,1) PRIMARY KEY NOT NULL,
foreign_id int NOT NULL FOREIGN KEY REFERENCES TableName (fieldname),
field1 varchar(255) NULL,
field2 money NULL,
field3 datetime NOT NULL DEFAULT GETDATE()
)
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment