RyuujinZero

Untitled

Mar 11th, 2021
1,077
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. USE Games
  2.  
  3. DECLARE @GameID AS INT
  4. DECLARE @Date AS DATE
  5. DECLARE @LicenseKey AS VARCHAR(255)
  6. DECLARE @Game AS VARCHAR(255)
  7. DECLARE @Platform AS VARCHAR(50)
  8.  
  9. SET @LicenseKey = 'ABCDE-FGHIJ-KLMNO'
  10. SET @Game = 'Gee 2: Gee Two Gee'
  11. SET @Platform = 'Steam'
  12.  
  13. INSERT INTO Games (GameName)
  14. VALUES (@Game);
  15.  
  16. SET @GameID = (
  17.     SELECT GameID
  18. FROM Games
  19. WHERE GameName = @Game
  20. );
  21.  
  22. SET @Date = (
  23.     SELECT GETDATE()
  24.     );
  25.  
  26. INSERT INTO LicenseKeys (GameID, DateAcquired, LicenseKey,Used,Platform)
  27. VALUES
  28. (@GameID,@Date,@LicenseKey,'No',@Platform);
RAW Paste Data