Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

New feature: Reformat SQL

ansgar's profile image ansgar posted 10 years ago in News
We've all been there: Getting some totally unreadable portion of SQL queries from someone else's code, and you are hard working to find the logic in order to understand it. Now, HeidiSQL can reformat such SQL, so it gets readable again. Just press the relevant button on the main toolbar:


Example code, before reformatting:
select * # select
from bla join bla on b=1 left
join blub on /* big comment select */ b.ud = udfu
where biuaosdi=1 and concat(  a , 'das'   ) like date_sub(now(), interval 1 day)
order   ' concat () ' # select
by rand() group by askdhja limit   10,     199


... and after reformatting:
SELECT * # select
FROM bla
JOIN bla ON b=1
LEFT JOIN blub ON /* big comment select */ b.ud = udfu
WHERE biuaosdi=1 AND CONCAT(a, 'das') LIKE DATE_SUB(NOW(), INTERVAL 1 DAY)
ORDER ' concat () ' # select
BY RAND()
GROUP BY askdhja
LIMIT 10, 199
1 attachment(s):
  • reflow-button

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