Subquery Returns more than one row
===

I have a problem regarding mysql.

I have few tables like course, papers, students, studentspapers


now what i want is that my query should return the result like:

It should select student name, student category from students table, students optional paper from studentspaper but i have not mentioned anything in my studentpapers table but in papers table. 

Papers table have id as primary key which i have used in studentspaper as foreign key.

Now the simple query i am using is :

select st.name, s.paperid from students st, sps s join papers on paperid where paperid= (select p.p_id from papers p where type='optional') and st.course=1

i dont know what shall i do. 

Its saying suubquery return more than 1 row #1242

