Skip to content

Instantly share code, notes, and snippets.

@joewashington75
Created May 27, 2020 08:07
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 joewashington75/efaa1ecfc72e61148216196e3ba6ad54 to your computer and use it in GitHub Desktop.
Save joewashington75/efaa1ecfc72e61148216196e3ba6ad54 to your computer and use it in GitHub Desktop.
ALTER TABLE Customers ADD AddressLine1 VARCHAR(255);
ALTER TABLE Customers ADD AddressLine2 VARCHAR(255);
ALTER TABLE Customers ADD AddressLine3 VARCHAR(255);
ALTER TABLE Customers ADD Postcode VARCHAR(9);
GO;
INSERT INTO Customers (FirstName, LastName, AddressLine1, AddressLine2, AddressLine3, Postcode)
VALUES ('Joe', 'Washington', 'AddressLine1', 'AddressLine2', 'AddressLine3', 'Postcode');
Go;
CREATE TABLE CustomerOrders
(
Id INT IDENTITY(1, 1) PRIMARY KEY,
CustomerId INT FOREIGN KEY REFERENCES Customers(Id),
OrderDate DATETIME
);
Go;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment