by deadonce on Sat Sep 24, 2011 10:49 am
([msg=61807]see Re: Think Very Carefully About What the SQL Commands are Doing[/msg])
So, in order to solve this mission, we have to union two tables. We can get the number of columns for the first table with "ORDER BY".
My question is, how do we get the second table's number of columns? Since it is not initially loaded on the u**, we can't really use the "ORDER BY" command to tell, can we?
For example, it is easy to guess that the e**** table has only 1 column, but in reality, it may have many many columns. How will we know how many?
Trial and error with nulls can be tedious for larger tables, especially if the first table has the first or so columns as int instead of string, and we have to put it as "null, *, (so many null,s)" in order to read the string values.
Any suggestions for a more elegant solution?