# SQL Console to View

**URL:** <https://www.ruby-forum.com/t/sql-console-to-view/162167>\
**Category:** Rails\
**Created:** [March 6, 2009, 11:52am UTC](https://www.ruby-forum.com/t/sql-console-to-view/162167 "2009-03-06T11:52:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luboherko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/b782af/32.png) [@luboherko](https://www.ruby-forum.com/u/luboherko)\
**Post date:** [March 6, 2009, 11:52am UTC](https://www.ruby-forum.com/t/sql-console-to-view/162167/1 "2009-03-06T11:52:02Z")

</div>

Hi, I have one request… is there any way, how can I display SQL console  
results in view? I mean, for example I have PostgreSQL server, and a  
simple form, where user can put any SQL command, which will be executed  
via ActiveRecord::Base.connection.execute(sql) and the actual response  
(if possible) will be returned to view… just like sql comman line  
utility or something…

Thanks for any advice…

Lubomir Herko
