Created
April 11, 2023 21:26
-
-
Save shaneis/4fe1308b40bcc5babdba091b4a5295de to your computer and use it in GitHub Desktop.
Create table and query the results for wordle answers
This file contains 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 */ | |
IF NOT EXISTS | |
( | |
SELECT * | |
FROM [sys].[tables] AS [t] | |
JOIN [sys].[schemas] AS [s] | |
ON [t].[schema_id] = [s].[schema_id] | |
WHERE | |
[t].[name] = N'WordleAnswers' | |
AND [s].[name] = N'dbo' | |
) | |
BEGIN | |
CREATE TABLE [dbo].[WordleAnswers] | |
( | |
[wordle_answers] char(5) NOT NULL | |
CONSTRAINT PK_WordleAnswers PRIMARY KEY | |
); | |
PRINT N'Table created'; | |
END; | |
ELSE | |
BEGIN | |
PRINT N'Table already exists'; | |
END; | |
SELECT | |
* | |
FROM [dbo].[WordleAnswers] AS [w]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment