My Oracle Support Banner

SQL Script Having Two Semicolons at the End Shows SQL Statement in the Spool File Output (Doc ID 1546256.1)

Last updated on MAY 27, 2023

Applies to:

SQL*Plus - Version and later
Information in this document applies to any platform.


You have a script that contains a SQL statement with two semicolons (;) at the end. Executing this script in SQL*Plus 8.0.6 shows only the queried records in the spooled output file.  However, with SQL*Plus 10.2.x and higher, the spool output contains the actual SQL statement in addition to the queried records.

For Example:

Your script (call it mysql.sql) has the following code:



This is seen after migrating scripts from SQL*Plus 8.0.6 (usually part of E-Business Suite) to SQL*Plus 10.2.x and higher.



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.