select [expression]

[expired user #6086]'s profile image [expired user #6086] posted 12 years ago in Running SQL scripts Permalink
Is it possible to get result of expression in query like "SELECT 1+1". Expecting result is "2" smile
ansgar's profile image ansgar posted 12 years ago Permalink
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.
[expired user #6086]'s profile image [expired user #6086] posted 12 years ago Permalink
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's profile image jfalch posted 12 years ago Permalink
in the results pane, immediately below query input area, where all SELECT results are shown.
ansgar's profile image ansgar posted 12 years ago Permalink
Hehe, I guess you did enlarge the query editor down to the bottom so you just don't see the grid. Please check that.
[expired user #6086]'s profile image [expired user #6086] posted 12 years ago Permalink
WTF...
I just can't find the results pane. Where is it hides from me? happy
prooflink http://imm.io/epT1
jfalch's profile image jfalch posted 12 years ago Permalink
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's profile image ansgar posted 12 years ago Permalink
Exactly - you can start regedit.exe, go to
HKEY_CURRENT_USER\Software\HeidiSQL

and delete the value "querymemoheight".
[expired user #6086]'s profile image [expired user #6086] posted 12 years ago Permalink
Thanks, anse!
It works now )

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