Professional Documents
Culture Documents
9th Oct6pm
9th Oct6pm
DDL :
i.Create:
---------
object:
------
Table:
------
-> max. 1000 columns are allowed and un-limited rows per a table.
Syntax:
-------
ex:
---
Desc <table_Name>:
-----------------
ii. ALTER:
----------
a.add:
------
b.modify:
--------
c. Rename(Column Name):
----------------------
d. Drop(Column):
---------------
iii.Rename(table Name):
-----------------------
iv. Truncate:
------------
syntax:
------
v. Drop(Table):
--------------
-> used to delete all records and structure from the database permanently.
syntax:
------
i. Insert:
----------
SQL Buffer:
syntax b:
---------
ii. Update:
-----------
syntax:
--------
ex:
write a query to set employee name as 'PRASAD' and set salary 4000 for empno 5;
-> used to delete all rows or specified rows from table Temporarilly.
i. Select.
syntax:
-------
IV. DCL
V. TCL
ORACLE OPERATORS:
----------------
-> Special Operators: IN, NOT IN, BETWEEN, NOT BETWEEN, LIKE, NOT LIKE,
IS NULL, IS NOT NULL.
5 demo tables:
--------------
-> Write a quety to display who are working 20th department and their jobs matched
with CLERK's
TRUTH TABLES:
------------
AND
T T T
T F F
F T F
F F F
-> Write a query to display who are working in 10 and 20th departments and their
jobs matched with CLERKS.
BODMAS Rule:
-----------
-> write a query to display who are getting salaries morethan 1000.
Special Operators:
-----------------