In the following my SQLite database has 10 values in each table. However, when performing my query there are around 100 results returned.
SELECT videoformat, audioformat FROM videocodec, audiocodec
Any ideas with why it is doing this?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your SQL says: for each row in videocodec, select all rows in audiocodec. That will give 10×10 or 100 rows. It’s equivalent to:
You probably mean to retrieve both audio and video codecs. You can do that with a union: