distal-attribute
distal-attribute
distal-attribute
distal-attribute

select [expression]

Igreh posted 3 years ago in Running SQL scripts
Is it possible to get result of expression in query like "SELECT 1+1". Expecting result is "2" smile
ansgar posted 3 years ago
Yes, of course, the server is able to do math expressions. Just try it. Other examples:

SELECT POW(2, 32);
SELECT 60 * 60 * 24;
SELECT RAND();


You can browse function names via rightclick in a query editor > "Insert function" > "Numerical functions" etc.
Igreh posted 3 years ago
It works, but where is the result?
All I see is:

SELECT POW(2, 32);
/* 0 rows affected, 1 rows found. Duration for 1 query: 0,000 sec. */

jfalch posted 3 years ago
in the results pane, immediately below query input area, where all SELECT results are shown.
ansgar posted 3 years ago
Hehe, I guess you did enlarge the query editor down to the bottom so you just don't see the grid. Please check that.

Igreh posted 3 years ago
WTF...
I just can't find the results pane. Where is it hides from me? happy
prooflink http://imm.io/epT1
jfalch posted 3 years ago
normally, there should be a results pane directly below the query pane, above the log pane; cf http://imm.io/eqLF. If this is not the case, the most possible explanation is, as anse said, that the query pane has been made so much larger that the results pane is completely hidden by it. try to click and hold mouse button on the lower border of the query pane; if the mouse pointer turns into a two-headed vertical arrow, drag upwards; this should make the results pane re-appear.
if this should not work, i think you could ask anse for some registry magic, to reset pane sizes to "factory defaults".
ansgar posted 3 years ago
Exactly - you can start regedit.exe, go to

HKEY_CURRENT_USER\Software\HeidiSQL


and delete the value "querymemoheight".
Igreh posted 3 years ago
Thanks, anse!
It works now )

Please login to leave a reply, or register at first.