Step 1: Tender Architecture Design
Step 2: Create Table Script
Step 1: Tender Architecture Design
Step 2: Create Table Script
CREATE TABLE table_name ( column1 datatype null/not null, column2 datatype null/not null, ... CONSTRAINT constraint_name PRIMARY KEY (column1, column2, ... column_n) );
ALTER TABLE table_name add CONSTRAINT constraint_name PRIMARY KEY (column1, column2, ... column_n);
CREATE TABLE table_name ( column1 datatype null/not null, column2 datatype null/not null, ... CONSTRAINT fk_column FOREIGN KEY (column1, column2, ... column_n) REFERENCES parent_table (column1, column2, ... column_n) );
ALTER TABLE table_name disable CONSTRAINT constraint_name;
ALTER TABLE table_name enable CONSTRAINT constraint_name;
CREATE TABLE table_name ( column1 datatype null/not null, column2 datatype null/not null, ... CONSTRAINT constraint_name UNIQUE (column1, column2, . column_n) );
ALTER TABLE table_name add CONSTRAINT constraint_name UNIQUE (column1, column2, ... column_n);
CREATE [UNIQUE] INDEX index_name ON table_name (column1, column2, ... column_n) [ COMPUTE STATISTICS ];
Rename Index
ALTER INDEX index_name RENAME TO new_index_name;
Rebuild :If you forgot to collect statistics on the index when you first created it or you want to update the statistics, you can always use the ALTER INDEX command to collect statistics at a later date.
ALTER INDEX index_name REBUILD COMPUTE STATISTICS;
DROP INDEX index_name;
syntax:
INSERT INTO table (column-1, column-2, ... column-n) VALUES (value-1, value-2, ... value-n);
INSERT ALL INTO suppliers (supplier_id, supplier_name) VALUES (1000, 'IBM') INTO suppliers (supplier_id, supplier_name) VALUES (2000, 'Microsoft') INTO suppliers (supplier_id, supplier_name) VALUES (3000, 'Google') SELECT * FROM dual;
INSERT INTO suppliers (supplier_id, supplier_name) SELECT ss.supplier_id, ss.supplier_name FROM xx_suppliers_stg ss;
UPDATE table SET column = expression WHERE predicates;
UPDATE suppliers SET supplier_name = (SELECT customers.name FROM customers WHERE customers.customer_id = suppliers.supplier_id) WHERE EXISTS (SELECT customers.name FROM customers WHERE customers.customer_id = suppliers.supplier_id);
DELETE FROM table
WHERE predicates;
DELETE FROM TableA WHERE NOT EXISTS ( select * from TableB where TableA.field1 = TableB.fieldx and TableA.field2 = TableB.fieldz );
SQL: ALTER Statement
ALTER PACKAGE [schema.]package_name COMPILE [DEBUG PACKAGE|SPECIFICATION|BODY];ALTER PACKAGE APPS.AD_ZD_SEED COMPILE BODY