queries.sql 397 B

1234567891011121314151617181920
  1. --name: get-world
  2. -- Query a World record from the database
  3. SELECT * FROM world
  4. WHERE id = :id
  5. --name: get-all-fortunes
  6. -- select all records from the fortune table
  7. SELECT * FROM fortune
  8. --name: update-world<!
  9. -- update an existing world record
  10. UPDATE world
  11. SET randomNumber = :randomNumber
  12. WHERE id = :id
  13. --name: get-all-fortunes
  14. -- query all fortune records
  15. SELECT id, message FROM fortune