View error in PostgreSQL

前端 未结 4 1332
南旧
南旧 2021-01-01 18:41

I have a large query in a PostgreSQL database. The Query is something like this:

SELECT * FROM table1, table2, ... WHERE table1.id = table2.id...
         


        
4条回答
  •  失恋的感觉
    2021-01-01 18:58

    If you got here because you are trying to use a function like to_date and getting the "defined more than once" error, note that you need to use a column alias for functions, e.g.:

    to_date(o.publication_date, 'DD/MM/YYYY') AS publication_date
    

提交回复
热议问题