sql - why results of two queries are different? -


  Select a different ID, the title, taking the curese_id into the course, takes you to the course. Where corsse_id = takes.course_id .course_id in (takes corsse_id from selection, where id = '10204');   
  Select ID, title, takes corsse_id course course is included in course.course_id = takes.course_id where id = '10204';   

I want to ask the course ID and the title of those courses, whose students take the ID of 10204 first gives a result with 5000 rows which is wrong. The second one give the right results. So what's wrong in the first?

In the first query, data is given to all students who take a course that is 10204 Takes. / P>

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -