I understand that drop removes the information along with the table structure whereas truncate maintains table structure.

Does drop/truncate email roll back segment ?

Each single DDL statement is really a discrete transaction. The reason being databases need manage their metadata (the information dictionary in Oracle). Essentially it needs to correct and valid constantly, so changes towards the metadata can't be folded back. Consequently an implicit commit is released pre and post each DDL statement. This really is is applicable to many, most likely all, RDBMS items.

Both TRUNCATE TABLE and DROP TABLE are DDL claims are DDL, so there's no rollback. If there's an Enterprise Edition license for any recent version of Oracle we are able to use FLASHBACK TABLE to recuperate the table to some previous condition, including BEFORE DROP.

edit

Listed here are the variations between Remove and TRUNCATE TABLE. The example date is large table:

SQL> exec dbms_stats.gather_table_stats(user,'BIG_TABLE')

PL/SQL procedure successfully completed.

SQL> select blocks, num_rows
  2  from user_tables
  3  where table_name = 'BIG_TABLE'
  4  /

    BLOCKS   NUM_ROWS
---------- ----------
     15449    2340320

SQL> 

Deletion first....

SQL> delete from big_table
  2  /

2340320 rows deleted.

Elapsed: 00:01:20.37
SQL>
SQL> exec dbms_stats.gather_table_stats(user,'BIG_TABLE')

PL/SQL procedure successfully completed.

Elapsed: 00:00:10.20
SQL>
SQL> select blocks, num_rows
  2  from user_tables
  3  where table_name = 'BIG_TABLE'
  4  /

    BLOCKS   NUM_ROWS
---------- ----------
     15449          0

Elapsed: 00:00:00.11
SQL>

And today the truncate ...

SQL> truncate table big_table reuse storage
  2  /

Table truncated.

Elapsed: 00:00:08.31
SQL> exec dbms_stats.gather_table_stats(user,'BIG_TABLE')

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.26
SQL>
SQL> select blocks, num_rows
  2  from user_tables
  3  where table_name = 'BIG_TABLE'
  4  /

    BLOCKS   NUM_ROWS
---------- ----------
         0          0

Elapsed: 00:00:00.00
SQL>

The variations between are apparent. The TRUNCATE is a lot, considerably faster. Plus it has zeroised the amount of blocks within the table. Observe that the gathering of statistics is faster following the truncation. The reason being the TRUNCATE statement starts over our prime water mark, (i.e. the zero blocks), therefore the job knows all of the designated blocks are unused.

In Oracle the reply is No, because the rollback segments are just employed for DML.

TRUNCATE is DDL.

Both drop and truncate email rollback segment.
You simply canrrrt do rollback by yourself because Oracle executes each DDL statement in separate transaction that's instantly began and commited.

It really works such as this:

begin
    COMMIT; -- any outstanding work
    begin
       DDL statement;
       COMMIT; -- the DDL statement
    exception
       when others then
            ROLLBACK;  -- any work done by the DDL
            RAISE;     -- reraise the exception back to the client
    end;
end;

Just in case of system crash in middle of DDL statement Oracle will have the ability to rollback interrupted operation.

Supply of information: article on Ask Tom.