/*-----------------------DDL-OPERATION----------------------------------*/
////////////////////////Create////////////////////////////////////
create table Employee(ID int, Name varchar(20), Dept-Name int, Location varchar);
////////////////////////Alter///////////////////////////////////
1: Changing Datatype:-
Alter Table Employee Alter Dept-Name smallint;
2: Added new column into table:-
Alter Table Employee add Qulification varchar(20);
3: Rename the column name:-
Sp_Rename "Employee"."Location", "Loc"."column";
[Link] the column name:-
Alter Table Employee Drop Qulification;
////////////////////////Rename-Table////////////////////////////////////
Sp_Rename Employee, Employee-Details;
////////////////////////Truncate the table//////////////////////////////
Truncate Table Employee;
////////////////////////Drop the table//////////////////////////////////
Drop Table Employee;
/*-----------------------DML-OPERATION-----------------------------------*/
////////////////////////Insert the table//////////////////////////////////
1:Explict Method:-
Insert into Employee-Details values(1, sam, Java, Banglore);
1:Implict Method:-
Insert into Employee-Details(ID , Name , Dept-Name , Location) values(1, sam, Java,
Banglore);
////////////////////////Update the table//////////////////////////////////
Update Employee-Details set where ID=2