To beautify the SQL code, use the SQL Beautifier (a free tool) or Formatter Plus from Quest Software. Use the script below only convert from Java to SQL and vice versa.