Prepend table name to each column in a result set in SQL? (Postgres specifically)
问题 How can I get the label of each column in a result set to prepend the name if its table? I want this to happen for queries on single tables as well as joins. Example: SELECT first_name, last_name FROM person; I want the results to be: | person.first_name | person.last_name | |-------------------|------------------| | Wendy | Melvoin | | Lisa | Coleman | I could use "AS" to define an alias for each column, but that would be tedious. I want this to happen automatically. SELECT first_name AS