Uploaded by vignesh

Oracle

advertisement
Oracle
5-20-2021
DDL-DATA DEFINITION LANGUAGE
Which is used to define data structures. For ex: create table,alter
table are istrctions in SQL.
Syntax:describe table_name
SQL COMMANDS:





Create
Alter
Drop
Rename
Truncate
Create:
Querycreate table Students_details
(Student_name char(10),
student_id number(5),
D_O_B
Output-
varchar2(15));
Alter:
Add
Modify
Rename
Drop
Add one column and datatype
Queryalter table students_details
add gender char(2);
output-
Modify the one column and datatype
Queryalter table students_details
modify gender char(4);
Output-
Rename the one column_name
Queryalter table students_details
rename column gender to gender_o_s;
Output-
Drop columns
Queryalter table students_details
drop column student_name;
Output-
DML-DATA MANIPULATION LANGUAGE
Which is used to Manipulate data itself. For ex:
insert,update,delete are istrctions in SQL.
SQL COMMAND :
 INSERT
 UPDATE
 DELETE
INSERT data into TABLES:
Query-
Download