SQL$HELP72.HLB  —  TRUNCATE_TABLE, Examples
    Example 1: Deleting data from a table while still maintaining the
    metadata definitions

    The following example shows how to delete the data from the
    SALARY_HISTORY table and still maintain the metadata definitions:

    SQL> TRUNCATE TABLE salary_history;
    SQL> --
    SQL> -- The table still exists, but the rows are deleted.
    SQL> --
    SQL> SELECT * FROM salary_history;
    0 rows selected
    SQL> SHOW TABLE (COLUMN) salary_history;
    Information for table SALARY_HISTORY

    Columns for table SALARY_HISTORY:
    Column Name                     Data Type        Domain
    -----------                     ---------        ------
    EMPLOYEE_ID                     CHAR(5)          ID_DOM
     Foreign Key constraint SALARY_HISTORY_FOREIGN1
    SALARY_AMOUNT                   INTEGER(2)       SALARY_DOM
    SALARY_START                    DATE VMS         DATE_DOM
    SALARY_END                      DATE VMS         DATE_DOM
Close Help