Skip to content

Instantly share code, notes, and snippets.

@DRibeiro1124
Created September 13, 2018 14:01
Show Gist options
  • Save DRibeiro1124/8ca1a672b418c244f921294d43deda33 to your computer and use it in GitHub Desktop.
Save DRibeiro1124/8ca1a672b418c244f921294d43deda33 to your computer and use it in GitHub Desktop.
My first GIST PostgreSQL Practice
SELECT * FROM employees
SELECT * FROM employees where salary > 10000000 and is_starter = true
SELECT * FROM employees where position = 'Goalkeeper'
SELECT * FROM employees where jersey_number = 10
SELECT full_name, jersey_number from employees where is_starter = true
*Added a new player (Coutinho) to database and going to delete this player*
SELECT * FROM employees where full_name = 'Coutinho'
DELETE FROM employees where full_name = 'Coutinho'
*Updated two players from being a starter*
UPDATE employees SET is_starter = false where full_name = 'Jordan Henderson'
UPDATE employees SET is_starter = true where full_name = 'Alex Oxlade-Chamberlain'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment