The web.database distribution comes with an Interactive Prompt which allows you to enter SQL queries directly into a database and see the results as a table of data. The sql.py file is in the scripts directory of the distribution.
Warning: Each time an SQL command is issued a new connection is made and the result of the SQL statement is committed. You cannot rollback changes made through the interactive prompt.