2 , acting on multiple columns Eg : Select DISTINCT name, ID from A The following results are performed: is actually based on name and the ID two fields come and go heavy, this way Access , MySQL , SQL Server support at the same time. Eg : Select distinct Xing, Ming from B Returns the following results: The returned result is two lines, which indicates distinct is not the right Xing and the Ming two columns " string concatenation " and then go back to the heavy, but separate for the Xing and the Ming column. Note: From the example above, it can be found that when distinct when applied to more than one field, the scope of its application is all the fields that follow it, not just a field next to it . and distinct can only be placed in front of all fields , The following statement is incorrect: SELECT Xing, distinct Ming from B ; // The statement is wrong The following error is thrown: [ERR] 1064-you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' DISTINCT-province from B ' At line 1 |