Consoling out the SQL code