01-02-2013, 03:14 PM
DATA DEFINITION LANGUAGES (DDL) COMMANDS
DATA DEFINITION.docx (Size: 15.02 KB / Downloads: 20)
Aim:
To study and execute the DDL commands in RDBMS
DDL commands:
CREATE
ALTER
DROP
RENAME
TRUNCATE
SYNTAX’S OF COMMANDS
CREATE TABLE:
To make a new database, table, index, or stored query. A create statement in SQL creates an object inside of a relational database management system (RDBMS).
ALTER A TABLE:
To modify an existing database object. Alter the structure of the database.To add a column in a table
ALTER TABLE table_name ADD column_name datatype;
To delete a column in a table
ALTER TABLE table_nmae DROP column column_nmae;
DROP TABLE:
Delete Objects from the Database
DROP TABLE table_name;
TRUNCATE TABLE:
Remove all records from a table, including all spaces allocated for the records are removed.
RESULT
Thus the DDL commands were studied and executed in RDBMS.