Reputation: 1311
I wish to select two distinct columns and one normal. But it seems like the error of missing right parenthesis keep coming out when i already written properly.
Here's the sample code:
Select Distinct(F.DATE, F.EXAM_TIME), T.*
From Test T, ExamRecords F
Where T.TestNo= 10
And T.TestPaper = 'Science';
Thanks for any clarification given/mistakes that i have made~
Upvotes: 0
Views: 167
Reputation: 2247
DISTINCT wont work based on columns, it works on the entire row, you may want to use Group BY
Upvotes: 1
Reputation: 10389
DISTINCT
can only be applied to the complete row in the query result.
Upvotes: 2