posts - 4, comments - 5, trackbacks - 0

July 2009 Blog Posts

Tidy sql posted on your blog

As a sql developer, DBA.  we often post sql code on our blog.    Take this sql for example, select pub_name, count(qty) as orders, sum(qty) as total from sales inner join titles on (sales.title_id=titles.title_id) right join publishers on (publishers.pub_id=titles.pub_id) group by pub_name It's really difficult for others to read. and how about this one after beautify previous sql: SELECT   pub_name,          Count(qty) AS orders,          Sum(qty)   AS total FROM     sales          INNER JOIN titles            ON (sales.title_id = titles.title_id)          RIGHT JOIN publishers            ON (publishers.pub_id = titles.pub_id) GROUP BY pub_name Yes, it's really good for your readers. Now, you can do this instantly with the help of a free online sql formatter: http://www.dpriver.com/pp/sqlformat.htm 1. Paste original sql code into input sql text box, then select corresponding database type, and...

posted @ Tuesday, July 28, 2009 5:31 AM | Feedback (1) |

Powered by:
Powered By Subtext Powered By ASP.NET