Professional Documents
Culture Documents
Objective:
1-Database Login and sample schema
2-Introduction to SQL (DML, DDL, DCL)
3-SQL sample commands and interactions
4-Learning and practice
Scope:
The student should know the following:
Login and work around SQL
SQL Practice
Basic exercises
Useful Concepts :
Command level programming experience
How to see source data as a table
Table name, its column name and column’s datatypes
Discussion:
DML, DDL, DCL
Login:
User id: stxxxxxxxxx
Password: oracle
Host string: (Database name)
SQL>show user
select *
from tab;
To load sample tables with data, download file demobld.sql from my slate
Ejaz Ahmed 1
Save it at D-drive, unzip it and follow up as
SQL>@d:\demobld.sql
select *
from tab;
Ejaz Ahmed 2
Exercises:
desc dept
select job
from emp;
Ejaz Ahmed 3
Ejaz Ahmed 4
select *
from emp
where ename like '_A%';
select *
from emp
where ename like '%A%';
select *
from emp
where ename NOT like '%A%';
select *
from emp
where comm IS NULL;
Ejaz Ahmed 5
select *
from emp
where comm = NULL; -- does not give you any output
Q. display project number, project name and name of project manager number
Q. List of project number, employee number and duration of employee who works in project
Evaluation:
Your Lab Work grade will depend on your active participation, individual efforts in solving Lab
Problem and Seriousness during the lab.
Ejaz Ahmed 6