Generally we spool output like this
spool filename
select * from emp;
spool off;
But the following one also giving the same output
SELECT ' ALTER TABLE ' || TABLE_NAME || ' DROP CONSTRAINT ' || CONSTRAINT_NAME || ' ; '
FROM USER_CONSTRAINTS
WHERE R_CONSTRAINT_NAME IS NOT NULL
/
SPOOL CONS.SQL
/
SPOOL OFF
@CONS.SQL
Is it not compulsory to write semicolon at the end of the statement?
Could any one please explain the spooling process in second one?