trunc oracle code example
Example 1: truncate oracle
TRUNCATE TABLE tablename
Example 2: trunc sql
SELECT TRUNC(TO_DATE('27-OCT-92','DD-MON-YY'), 'YEAR')
"New Year" FROM DUAL;
New Year
---------
01-JAN-92
Example 3: oracle sql truncate table
-- Quick, no possible rollback
TRUNCATE TABLE my_table;
-- With rollback
DELETE FROM my_table;
COMMIT;
Example 4: trunc in sql
TRUNC function returns a date truncated
to a specific unit of measure.
TRUNC function returns a date truncated
to a specific unit of measure.