Ask Your Question
4

What is the reason for not being able to retrieve table names with a UNION query?

asked 2021-05-27 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-05-23 18:00:00 +0000

plato gravatar image

A UNION query combines the results of two or more SELECT statements into a single result set. When using UNION, the column names and data types of the result set are determined by the column names and data types of the first SELECT statement. Therefore, the names of the tables used in subsequent SELECT statements are not needed or recorded. As a result, it is not possible to retrieve table names with a UNION query.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-05-27 11:00:00 +0000

Seen: 1 times

Last updated: May 23 '21