Implemented running of sql statements.