I want to do SELECT DISTINCT guid, ..., but I do not want to guidappear in the recordset. How to do it?
SELECT DISTINCT guid, ...
guid
Wrap it in a subquery?
select my, interesting, columns from ( select distinct GUID, ... from ... )
SELECT a.Field2 , a.Field3 FROM (SELECT DISTINCT a.guid , a.Field2 , a.Field3 FROM table1 a) a
You can also do
SELECT x, y FROM tbl GROUP BY guid, x, y
The disadvantage here is that you need to duplicate the list of columns in the sentence GROUP BY, which is annoying, but other answers also do.
GROUP BY
first select individual values in the temp table.
Then select only the desired values.
Source: https://habr.com/ru/post/1745294/More articles:How to set a data type property as smalldatetime - c #What syntax of sugar or language features makes the language hard / hard for analysis? - syntaxParsing xml with dom4j or jdom or in any case - javaHow to pass complex objects to ASP.NET MVC using Get parameters? - parameter-passingWhich software design pattern is best for the following scenario (C #) - designMessaging over a network - c #Special BlackBerry Style Sheet - cssУдерживать большую часть объекта в кеше/памяти, встроенной в базу данных? - javaHow to scroll the entire visible page to an anchor with a smooth effect (Scriptaculous or jQuery)? - javascriptWhat is the difference in syntax between Symbian C ++ and canonical C ++? - c ++All Articles