SQL-Coding App for iPad
There are quite a few SQL clients in the App Store, PostGres, MySql, Oracle, SqlServer

Impathic make one for just about every database such as


SQL Server Mobile Database Client


I've not used these products myself, but they are known to be limited to creating queries graphically, you can't write your own SQL.

The higher end versions, do allow you greater flexibility and the iPad apps are pretty good, however and this is a caveat, if you run SQL that returns lots of data, the query runs slowly since the amount of data being returned can be large and the handling of the large amount of data is limited by the iOS devices memory.  Write more concise SQL to return only the data you need and the apps run fine.