Thursday, April 14, 2016

ORACLE Drop Table If Exists

BEGIN
   EXECUTE IMMEDIATE 'DROP TABLE mytable';
EXCEPTION
   WHEN OTHERS THEN
      IF SQLCODE != -942 THEN
         RAISE;
      END IF;
END;


Till Next Time

ORACLE Available Tables

SELECT
  OWNER,
  TABLE_NAME
FROM ALL_TABLES
ORDER BY TABLE_NAME;


SELECT
  OWNER,
  TABLE_NAME
FROM ALL_TABLES@DB_LINK
ORDER BY TABLE_NAME;


Till Next Time

Friday, April 8, 2016

ORACLE All Avialable Database Links

SELECT
  OWNER,
  DB_LINK
FROM
  ALL_DB_LINKS;

Till Next Time