Skip to main content

Posts

Showing posts with the label DDL Commands

DDL Queries

                        DDL(DATA DEFINITION LANGUAGE)             DDL  refers to "Data Definition Language", a subset of SQL statements that change the structure of the database schema in some way, typically by creating, deleting, or modifying schema objects such as databases, tables, and views.    ➤CREATE ➤ALTER ➤DROP ➤TRUNCATE   ➤RENAME ➥ Create Query:- ➧     CREATE TABLE EMP(EMPID NUMBER(5),NAME VARCHAR2(15), SALARY  NUMBER(7,2),EMAIL VARCHAR(20)); ➧    CREATE TABLE DEPT AS SELECT * FROM DEPARTMENTS; "This Query will Create Table when we want to copy the data of any table into new table.Here old table is DEPARTMENTS. ➥ Alter Query :-  ALTER' COMMAND IS USED TO MODIFY TABLE STRUCTURE. ➧     ALTER TABLE EMP MODIFY EMPID NUMBER(10);  "this will change the data type...