Here's what TOAD uses but as I recall you can't get the underlying DDL statement for CTAS. Maybe changed in 10g. SELECT sql_text FROM v$sqltext_with_newlines WHERE hash_value = TO_NUMBER (:HASH) ORDER BY piece