query of any data that is not in the table in mysql

2

How do I get this out?

declare monto double;
set monto =500.00;

select '','',monto,'','' from [que tabla iría aquí]

and the result that is as follows because I want to join a query as a result

[vacio] [vacio] [500.00] [vacio] [vacio]

in 4gl I could do it but in mysql I do not know how to do it maybe a master table or temp is not

    
asked by Juan Diego 13.06.2017 в 21:22
source

2 answers

0

It would help a lot if you gave us a little more information about the doubt you have, what I interpret is that you need the query to return you only the amount column.

In MySQL you would only need the following query:

SELECT monto FROM nombre_tabla;
    
answered by 13.06.2017 в 21:44
0

If I can understand, what you want to do is generate empty columns on the sides of one that already has the data, right ?. If so, what you should use is null for the column you want to reflect as empty.

DECLARE monto double;
SET monto =500.00;
SELECT null, null, monto, null, null;

You would not need to specify any table, it's just a sentence. I can not understand the end of your question, but with it I would answer your question.

    
answered by 13.06.2017 в 22:07