When you run the query, data from each set of corresponding fields is combined into one output field, so that the query output has the same number of fields as each of the select statements.
Al ejecutar la consulta, los datos de cada conjunto de campos correspondientes se combinan en un único campo de resultado de modo que el resultado de la consulta tenga el mismo número de campos que cada una de las instrucciones SELECT.
The SELECT statements that you combine must have the same number of output fields, in the same order, and with the same or compatible data types.
Las instrucciones SELECT que combine deben tener el mismo número de campos de resultado, en el mismo orden y con el mismo tipo de datos o con tipos de datos compatibles.
We got two result grids because of two SELECT statements: the first one is 1 divided by 0 which causes the error and the second one is the transferred control that actually gave us some results.
Generamos dos cuadrículas de resultados debido a dos instrucciones SELECT: la primera es 1 dividida por 0, lo que causa el error y la segunda es el control transferido que realmente nos dio algunos resultados.
The basic SQL syntax for a union query that combines two SELECT statements is as follows
La sintaxis básica de SQL para una consulta de unión que combina dos instrucciones SELECT es la siguiente
Multiple SELECT statements generate multiple result sets, so the client must use a MySQL client library that supports multiple result sets.
Comandos SELECT múltiples generan varios conjuntos de resultados, así que el cliente debe usar una biblioteca cliente de MySQL que soporte conjuntos de resultados múltiples.
The following example shows the incorrect and correct use of UNION in two SELECT statements in which a column is to be renamed in the output.
En el siguiente ejemplo se muestra el uso correcto e incorrecto de UNION en dos instrucciones SELECT en las que se va a cambiar el nombre de una columna en el resultado.
Potentieel gevoelige of ongepaste informatie
Er worden alleen voorbeelden gegeven om u te helpen het woord of de woordcombinatie waarop u hebt gezocht, te vertalen. Deze worden niet door ons geselecteerd of gevalideerd en kunnen ongepaste taal bevatten. Wij vragen u melding te maken van voorbeelden die dienen te worden aangepast of verwijderd. Vertalingen met grof of informeel taalgebruik worden meestal rood of oranje gemarkeerd.