sql - How to fetch record from resulted table? -
i come across situation after executing query getting result this
stdid studentname subcode grade 1 pinky 1 1 pinky 2 1 leena 1 1 leena 2 1 leena 3 b 2 rupali 1 2 megha 1
grade d.i want show record once when grade same same stid,does not matter subcode , studentname.if grade different same stid,show both record. here want show
stdid studentname subcode grade 1 leena 2 1 leena 3 b 2 rupali 1
how that?
you can using distinct statement.
select distinct stdid, studentname, grade yourtable
note not possible show subcode column in case. if show this, need decide 1 of multiple values in subcode column should shown , join on original table. hope answers looking do. thanks..
Comments
Post a Comment