Category: Oracle

Oracle Alter Table

The Oracle Alter Table – allow you to add new columns, modify and drop columns, rename table, add constraints. Oracle Alter Table Alter Table contracts Add approve varchar2(3); Alter Table contracts Drop column approve; Alter Table customers Set unused (first_name, last_name);...

Oracle Add Column

The Oracle Add Column – allow you to add new columns to existing tables. Oracle Add Column Alter table contracts add approve varchar2(3); Alter table contracts add constraint ck_approve check (approve in ('YES', 'NO')); Alter table customers add ( city varchar2(80),...

Oracle System Packages

DBMS_ALERT – DBMS_ALERT supports asynchronous notification of database events. DBMS_OUTPUT – DBMS_OUTPUT package enables you to send messages from stored procedures, packages, and triggers. UTL_FILE – UTL_FILE package is used to read and write operating system text files. UTL_SMTP – UTL_SMTP...

Oracle UTL_SMTP

The Oracle UTL_SMTP package is designed for sending e-mails over Simple Mail Transfer Protocol (SMTP). Oracle UTL_SMTP example CREATE OR REPLACE PROCEDURE send_email ( p_sender VARCHAR2, p_recipient VARCHAR2, p_subject VARCHAR2, p_message VARCHAR2) IS my_host VARCHAR2(100) := 'smtp.codertutor.com'; v_mess VARCHAR2(1000); email_conn utl_smtp.connection;...

Oracle UTL_FILE

The Oracle UTL_FILE package is used to read and write operating system text files. Oracle UTL_FILE example CREATE OR REPLACE PROCEDURE cust_file ( url IN VARCHAR2, file IN VARCHAR2) IS test UTL_FILE.FILE_TYPE := UTL_FILE.FOPEN (url, file, 'W'); var VARCHAR2(1500); BEGIN FOR...