Академический Документы
Профессиональный Документы
Культура Документы
Varchar Varchar2
1) Varchar can identify NULL and empty string 1) Varchar2 cannot identify both separately. Both
2) Varchar can store minimum 1 and maximum 2000 2) Varchar2 can store minimum 1 and maximum
Ex: We defined varchar (15) and entered only 10 Ex: We defined varchar2 (15) and entered only 10
characters. But it allocates space for entire 15 characters. Then varchar2 will allocate space for 10
characters. characters only but not for 15.
6) Varchar definition may change in future. 6) Varchar2 definition will not change. It is standard.
DELETE
Delete
Delete remove the Data only, the Table structure remains intact.
This is a DML Statement
Rollback possible
No Commit is performed neither before nor after. (Because it is a DML Statement).
They take locks on rows,
They generate redo (lots of it)
They require segments in the UNDO tablespace.
A delete does not relinquish segment space thus a table in which all records have been
deleted retains all of its original blocks.
It can activate the triggers.
Drop
Drop permanently removes both the Data as well as the Table Structure.
This is a DDL Statement
Rollback not possible
It issues a COMMIT before it acts and another COMMIT afterward so no rollback of the
transaction is possible. (Because it is a DDL Statement)
No row-level locks are taken.
No redo or rollback is generated.
They do not require segments in the UNDO tablespace.
All extents bar the initial are de-allocated from the table
It does not activate the triggers.
While working on database, we are using Delete and Truncate without knowing the differences
between them. In this article we will discuss the difference between Delete and Truncate in Sql.
Delete: