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:

  1. there more 1 table involved in query
  2. functions used in query
  3. column names big or not readable
  4. two or more columns combined together

Comments

Popular posts from this blog

c++ - End of file on pipe magic during open -

basic authentication with http post params android -

data.table making a copy of table in R -