How to send email from oracle stored procedure
BEGIN UTL_MAIL.SEND ( sender => ‘[email protected]’, recipients => ‘rst@yahoo.’, subject => ‘test Oracle’, message => ‘testing orcl’); END; /
BEGIN UTL_MAIL.SEND ( sender => ‘[email protected]’, recipients => ‘rst@yahoo.’, subject => ‘test Oracle’, message => ‘testing orcl’); END; /
BEGIN FOR cur_rec IN (SELECT table_name, constraint_name FROM user_constraints WHERE constraint_type = ‘R’) LOOP EXECUTE IMMEDIATE ‘ALTER TABLE ‘ || cur_rec.table_name || ‘ DROP CONSTRAINT ‘ || cur_rec.constraint_name; END LOOP; FOR cur_rec IN (SELECT object_name, object_type FROM user_objects) LOOP BEGIN EXECUTE IMMEDIATE ‘DROP ‘ || cur_rec.object_type || ‘ ‘ || cur_rec.object_name; EXCEPTION WHEN OTHERS THEN […]
SELECT * FROM (SELECT * FROM TEST_TABLE ORDER BY dbms_random.value) WHERE rownum <= 5; This will give 5 random rows from table.