sql - distinct() function (not select qualifier) in postgres -
I just came in a SQL query, especially against a postgrad database, which uses a function called "separate" I.e. meaning:
select different (pattern) in the form of style, style, ... etc ... from the style scene ... etc ...
Note that this is not a simple qualifier - at least this is not the usual syntax for separate qualifiers, note the brackets. This is clearly using the difference in the form of a function, or maybe it has some special syntax.
What does this mean by any idea?
I tried to play it with a little bit and if I select <
different from the bar (<)
Find similar results
select foo to separate from the bar
When I add it to other fields in the same selection, it is quite clear to me It's not what it's doing.
I can not find anything in the postgrad documentation.
(The question is old , But in Google results high for "SQL is not a separate function" (second, first stack overflow) and still there is still not a satisfactory answer, so ...)
Actually this is a simple difference on the selection - but with a deceptive syntax (you are right about that point).
DISTINCT is not always a function, always a keyword here has been used (incorrectly) as if it was a function, but
would be style, style, Select different (pattern) as ... ..
is equivalent to all the following forms:
- Add a location after different
:
Select different (pattern) in the form of style, style, ... etc ... from the style scene where ... etc ... < / Code>
- Remove parentheses around the column name: Select different patterns as patterns, styles. Etc. ... from the style scene where ... etc ...
- Indent section content: