Printing SQL statement