Friday, December 14, 2018

General Ledger Tables in Oracle Apps R12

GL_JE_BATCHES
GL_JE_HEADERS
GL_JE_LINES
GL_CODE_COMBINATIONS
GL_BALANCES
GL_PERIODS
GL_JESOURCES
GL_SET_OF_BOOKS
GL_IMPORT_REFERENCES
GL_BUDGETS
GL_BUDGET_ENTITIES
GL_BUDGET_ASSIGNMENTS
GL_BUDGET_VERSIONS
GL_INTERFACE

Account Receivable Tables in Oracle Apps R12


RA_CUSTOMER_TRX_ALL
RA_CUSTOMER_TRX_LINES_ALL
RA_CUSTOMER_TRX_TYPE_ALL
RA_CUSTOMER_TRX_LINE_GL_DIST_ALL
RA_CUSTOMERS
RA_TERMS
RA_CUSTOMER_TRX_LINE_SALESREPS
AR_PAYMENT_SCHEDULES
AR_CUSTOMER_PROFILES
AR_CUSTOMER_PROFILE_CLASSES
AR_CASH_RECEIPTS
AR_MISC_CASH_DISTRIBUTIONS
AR_CASH_RECEIPT_HISTORY
AR_RECEIVABLE_APPLICATIONS
HZ_PARTIES
HZ_PARTY_SITES
HZ_CUST_ACCOUNTS
HZ_CUST_ACCOUNT_SITES_ALL
HZ_CUST_SITE_USES_ALL
HZ_LOCATIONS
HZ_CONTACT_POINTS
HZ_CUST_CONTACT_POINTS

Inventory Tables in Oracle Apps R12


MTL_SYSTEM_ITEMS_B
MTL_SYSTEM_ITEMS_INTERFACE
MTL_INTERFACE_ERRORS
MTL_ITEM_REVISIONS
MTL_ITEM_REVISIONS_INTERFACE
MTL_CATEGORY_SETS_B
MTL_ITEM_CATEGORIES
MTL_SECONDARY_LOCATORS
MTL_RELATED_ITEMS
MTL_ONHAND_QUANTITIES
CST_ITEM_COST
MTL_PARAMETERS
MTL_ITEM_ATTRIBUTES
MTL_ITEM_TEMPLATES
MTL_ITEM_TEMPL_ATTRIBUTES
MTL_UNITS_OF_MEASURE
MTL_SERIAL_NUMBERS
MTL_LOT_NUMBERS
MTL_ITEM_CATALOG_GROUPS
MTL_MATERIAL_TRANSATIONS
MTL_MATERIAL_TRANSATIONS_TEMP
MTL_DEMAND_INTERTFACE

Difference between DELETE, TRUNCATE and DROP

DELETE Statement: 
  • DELETE is a DML command.
  • Can rollback in DELETE.
  • Triggers get fired.
  • Can use conditions (WHERE clause) in DELETE.
  • DELETE does not reset the High Water Mark for the table

TRUNCATE statement: 
  • TRUNCATE is a DDL command.
  • TRUNCATE is much faster than DELETE.
Reason: When you type DELETE all the data get copied into the Rollback Tablespace first. Then delete operation gets performed. That way when you type ROLLBACK after deleting a table, you can get back the data (The system get it for you from the Rollback Tablespace). All this process takes time. But when you type TRUNCATE, it removes data directly without copying it into the Rollback Tablespace. That's why TRUNCATE is faster. Once you truncate you can’t get back the data.

  • Cannot roll back in TRUNCATE. TRUNCATE removes the record permanently.
  • The trigger doesn't get fired
  • Cannot use conditions (WHERE clause) in TRUNCATE.
  • TRUNCATE command resets the High Water Mark for the table
  • This command is used to delete all the rows from the table and free the space containing the table.
  • When a table is truncated all the references to the table will be valid.

DROP Statement: 
  • DROP is a DDL command.
  • No DML triggers will be fired.
The DROP command is used to remove an object from the data dictionary. If you drop a table, all the rows in the table are deleted and the table structure is removed from the database. Once a table is dropped we cannot get it back, so be careful while using the DROP command. When a table is dropped all the references to the table will not be valid.

If a table is dropped, all the relationships with other tables will no longer be valid, the integrity constraints will be dropped, and grant or access privileges on the table will also be dropped, if want uses the table again it has to be recreated with the integrity constraints, access privileges and the relationships with other tables should be established again. 
We cannot recover the table before Oracle 10g. But Oracle 10g provides the command to recover it by using the command (FLASHBACK)

What is cursor and types of cursor?

The Oracle engine uses a work area for its internal processing in order to execute an SQL statement. This work area is private to SQL’s operations and is called a cursor.

Implicit Cursor: Implicit cursor is declared by PL/SQL implicitly for all DML statements & for single rows.

Explicit Cursor: Explicit cursors are declared explicitly by the user, the explicit cursor is for queries only and allows multiple rows to be processed from the query Defined in the declare section of the plsql block.
You have made it like this:
Cursor C1 is select ename from emp;

Ref Cursor: Ref Cursor is the object name of the cursor type. It’s mainly used for dynamic purposes.
TYPE ref_type_name IS REF CURSOR [RETURN return_type]
TYPE empcurtype IS REF CURSOR [RETURN emp%type]