简体   繁体   中英

Specified distinct columns only

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~

DISTINCT只能应用于查询结果中的整个行。

DISTINCT无法基于列工作,它适用于整行,您可能要使用Group BY

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM