Advertisement
Silviya7

7. Buy Items for User in Game

Jun 9th, 2022
1,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.46 KB | None | 0 0
  1. INSERT INTO UsersGames ( GameId, UserId,CharacterId ,Level,JoinedOn, Cash)
  2. VALUES( (
  3. SELECT G.ID FROM Games  g where g.Name='Edinburgh'),(
  4. SELECT U.Id FROM Users U WHERE  u.Username='Alex'), '','',GETDATE(),
  5.  
  6.  
  7. (SELECT SUM(ii.Price)  FROM Items ii
  8. WHERE II.Id IN(
  9. SELECT Id FROM Items  WHERE Name IN('Blackguard', 'Bottomless Potion of Amplification',
  10. 'Eye of Etlich (Diablo III)', 'Gem of Efficacious Toxin', 'Golden Gorget of Leoric',
  11. 'Hellfire Amulet'))
  12. )
  13. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement