Q&A about the site for speakers of German wanting to discuss the finer points of the language and translation
DECLARE @Players TABLE ( ID INT PRIMARY KEY IDENTITY, Name VARCHAR(50) ) DECLARE @Matches TABLE ( ID INT PRIMARY KEY IDENTITY, WinnerId INT, LoserId INT ) DECLARE @Comments TABLE ( ID INT PRIMARY KEY IDENTITY, MatchId INT, Comment VARCHAR(MAX) ) INSERT INTO @Players VALUES ('Jeff') INSERT INTO @Players VALUES ('Rob') INSERT INTO @Players VALUES ('Steve') INSERT INTO @Players VALUES ('Fred') INSERT INTO @Matches VALUES (1,2) INSERT INTO @Matches VALUES (4,2) INSERT INTO @Matches VALUES (3,1) INSERT INTO @Comments VALUES (2,'That was a close one.') INSERT INTO @Comments VALUES (3,'I did not expect that outcome.') --SELECT * FROM @Players --SELECT * FROM @Matches --SELECT * FROM @Comments --get all matches that Rob has played SELECT * FROM @Matches where WinnerId = 2 OR LoserId = 2