Oracle - SQL Distinct Select on alias -
i selecting aliasing columns like
select t.name, t.surname table t conditions...;
now want add distinct function on particular column, therefor if selecting without alias like:
select distinct(name), surame table;
but how shall write select query on aliased colum names?
select distinct(t.name)
not works, neither select t.distinct(name)
;
how shall write select query on aliased column names?
you cannot write select query on aliased column names.
aliases useful following:
- there more 1 table involved in query
- functions used in query
- column names big or not readable
- two or more columns combined together
Comments
Post a Comment