Oracle DDL | DDL | Data Definition Language - oracle tutorial - sql tutorial
What is Data Definition Language (DDL) in oracle ?
- Data Definition Language (DDL) statements are used to define the database structure or schema.
- The schema to perform these functions are,
![Oracle Command Types](https://wikitechy.com/tutorials/oracle/img\oracle-images\oracle-command-types.jpg)
CREATE:
- It is used to create tables in the database.
![Oracle create table with normal](https://wikitechy.com/tutorials/oracle/img/oracle-images/oracle-create-table-with-normal.gif)
Learn oracle - oracle tutorial - Oracle create table with normal - oracle examples - oracle programs
CREATE TABLE [table name] ( [column definitions] ) [table parameters]
click below button to copy the code. By - oracle tutorial - team
ALTER :
- It is used to alters the structure of the database
![Oracle alter table](https://wikitechy.com/tutorials/oracle/img/oracle-images/oracle-alter-table.gif)
Learn oracle - oracle tutorial - Oracle alter table - oracle examples - oracle programs
ALTER table tablename parameters.
click below button to copy the code. By - oracle tutorial - team
DROP :
- It is used to delete the INDEX,TABLE and DATABASES in Drop Statement.
![Oracle drop table](https://wikitechy.com/tutorials/oracle/img/oracle-images/oracle-drop-table.gif)
Learn oracle - oracle tutorial - Oracle drop table - oracle examples - oracle programs
DROP table tablename.
click below button to copy the code. By - oracle tutorial - team
oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , plsql
TRUNCATE :
- It is used to remove all records from a table.
- Including all spaces allocated for the records are removed.
![Oracle truncate table](https://wikitechy.com/tutorials/oracle/img/oracle-images/oracle-truncate-table.gif)
Learn oracle - oracle tutorial - Oracle truncate table - oracle examples - oracle programs
TRUNCATE TABLE table_name;
click below button to copy the code. By - oracle tutorial - team
COMMENT :
- It is uses to add comments to the data dictionary
RENAME:
- It used to rename the table from old name to new name.
![Oracle alter table rename column](https://wikitechy.com/tutorials/oracle/img/oracle-images/oracle-alter-table-rename-column.gif)
Learn oracle - oracle tutorial - Oracle alter table rename column - oracle examples - oracle programs
RENAME TABLE old_name TO new_name;