Data Definition Language (DDL) is a type of SQL command that is used to define, modify, and manage the structure of database objects such as tables, indexes, schemas, and views.
- It primarily focuses on the creation, alteration, and deletion of database schema and its components.
Key Operations of DDL:
- CREATE: Used to create new database or objects in a database.
- ALTER: Used to modify the structure of a database, such as adding or dropping columns in a table.
- DROP: Deletes a database object from the database permanently.
- TRUNCATE: Deletes data from table.
- RENAME: Used to rename a table or a column.
- COMMENT: Used to comment on the data dictionary.
Oracle Data Types:
In Oracle, data types are used to define the type of data that can be stored in a column. Oracle provides a wide range of data types, allowing users to store various kinds of data such as numbers, strings, dates, and more.
Here’s a breakdown of the most commonly used Oracle data types:
- Numeric data types: NUMBER, INTEGER, FLOAT, BINARY_FLOAT, BINARY_DOUBLE.
- Character data types: CHAR, VARCHAR2, CLOB.
- Date and Time data types: DATE, TIMESTAMP, INTERVAL.
- Large object data types: BFILE, BLOB, CLOB, NCLOB.
- Rowid Data types: ROWID, UNROWID(SIZE)