Query returns duplicate rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My query is returning duplicates rows.

table: elements
elementId
standardId
elementtext
category
mcode
linenum

table: scores
scoreId
taskId
scores

Here's my query:
SELECT distinct elementtext,cateogy,mcode,linenum,scores,scoreId
FROM elements, scores
WHERE scores.taskId='12'
AND elements.standardId='APR.05'

This is returning duplicate rows, even though I'm using the DISTINCT keyword.

If I remove the field scoreId it is fine.

Any suggestions?


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux