SELECT employee_id, name, department FROM employees ORDER BY employee_id;
SPOOL OFF This will create a text file named employee_report.txt in the directory where you ran SQL*Plus. To create a PDF directly, you might consider using Oracle's UTL_FILE or SPOOL with a tool that converts text to PDF, or third-party reporting tools like Oracle BI Publisher, or external tools like Crystal Reports.
SPOOL employee_report.txt SET LINESIZE 100 SET PAGESIZE 20 SET FEEDBACK OFF SET ECHO OFF
SET LINESIZE 100 SET PAGESIZE 20 SET FEEDBACK OFF SET ECHO OFF

SELECT employee_id, name, department FROM employees ORDER BY employee_id;
SPOOL OFF This will create a text file named employee_report.txt in the directory where you ran SQL*Plus. To create a PDF directly, you might consider using Oracle's UTL_FILE or SPOOL with a tool that converts text to PDF, or third-party reporting tools like Oracle BI Publisher, or external tools like Crystal Reports.
SPOOL employee_report.txt SET LINESIZE 100 SET PAGESIZE 20 SET FEEDBACK OFF SET ECHO OFF
SET LINESIZE 100 SET PAGESIZE 20 SET FEEDBACK OFF SET ECHO OFF
