ORACLE
ORACLE QUERIES
SELECT
INSERT
INSERT ALL
UPDATE
DELETE
TRUNCATE TABLE
ORACLE TUTORIAL
Oracle Introduction
What Is Oracle
ORACLE TABLES
Create Tables
Create Table As
Alter Table
Drop Table
Global Temorary Tables
Local Temorary Tables
ORACLE VIEWS
Create View
ORACLE CLAUSES
DISTINCT
FROM
ORDER BY
GROUP BY
HAVING
ORACLE OPERATORS
UNION
UNION ALL
INTERSECT
MINUS
ORACLE JOINS
INNER JOIN
OUTER JOIN
EQUI JOIN
SELF JOIN
CROSS JOIN
ANTI JOIN
SEMI JOIN
ORACLE ADVANCE
PROCEDURES
FUNCTION
CURSOR
TRIGGER

TRUNCATE TABLE



Oracle - Truncate Table


In Oracle, TRUNCATE TABLE statement is used to remove all records from a table. It works same as DELETE statement but without specifying a WHERE clause. It is generally used when you don't have to worry about rolling back

Once a table is truncated, it can't be rolled back. The TRUNCATE TABLE statement does not affect any of the table's indexes, triggers or dependencies.


Syntax :
TRUNCATE TABLE [schema_name.]table_name   

Parameters :

  • schema_name : This parameter specifies the name of the schema that the table belongs to. It is optional.

  • table_name : It specifies the table that you want to truncate.


    Lets take an example of table containing 'customers' info to perform Truncate Query :
    Customer_idnamelastnamecity
    1MeherishChowdaryGujarat
    2AjaashiNehraMaharashtra
    3KaivalyaBhoopalamKarnataka

    Oracle TRUNCATE Table Example :


    Consider a table named "customers" and execute the following query to truncate this

    TRUNCATE TABLE customers;  
    
    

    Output :

    Table truncated.
    

    Now check the customers table, you will find that there is no data available in that table. It is equally similar to DELETE TABLE statement in Oracle.



    What Is Oracle

    What Is Oracle

    posted on 2019-11-29 01:11:21 - ORACLE Tutorials


    TRIGGER

    ORACLE - Trigger

    posted on 2019-11-28 22:14:22 - ORACLE Tutorials


    CURSOR

    ORACLE - Cursor

    posted on 2019-11-28 22:13:54 - ORACLE Tutorials


    MySQL TRIGGERS

    MySQL - Triggers

    posted on 2019-11-29 21:44:07 - mysql Tutorials


    Grant_ Revoke Privilege

    MySQL - Grant_ Revoke Privilege

    posted on 2019-11-26 23:15:04 - mysql Tutorials


    MySQL Vs SQL

    MySQL Vs SQL

    posted on 2019-11-25 05:02:26 - mysql Tutorials