#๐Ÿ”’ SQL unexpected output

16 messages ยท Page 1 of 1 (latest)

crystal nymph
#

the first query results in an error because team_id doesnt exist in games tables. However the second query return all the teams. How is that possible?

silent fulcrumBOT
#

@crystal nymph

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

random spoke
#

What are you trying to select? In your first query, you're trying to select a a column called team id from a table called games.

Are you sure you don't mean SELECT * FROM games ?

crystal nymph
#

those queries are pretty much random, i am not trying to select anything. I want to understand why the second query returned all names from teams table

#

i expected to get an error

sharp coral
#

Oh do you mean the sub query

crystal nymph
#

yes

#

makes no sense

#

should be an error

random spoke
#

Well I mean

#

does team_id even exist

#

Can you run DESCRIBE games

silent fulcrumBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.