In Zend Framework, you can use the Zend_Db_Select object's __toString() method to print the exact SQL query that will be executed.