Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

create user tejas

2.identified by bscit
3.default tablespace users
4.temporary tablespace temp;

grant resource,
connect to tejas

set serveroutput on;


declare
v_name varchar(10);
begin
v_name :='Rahul';
dbms_output.put_line(v_name);
end;
/

create table EMP1(eid int,ename varchar(10),e_age int,e_salary int);


insert into EMP1 values(1,'Raj',23,5000);
insert into EMP1 values(2,'Ajay',24,2000);
insert into EMP1 values(3,'Reema',25,2500);
insert into EMP1 values(4,'Meena',20,3000);
insert into EMP1 values(5,'Vivaan',23,3500);

select*from EMP1;

set serveroutput on;


declare
v_salary number(10);
begin
select e_salary into v_salary from EMP1 where eid=2;
dbms_output.put_line(v_salary);
end;
/

set serveroutput on;


declare
v_name varchar(10);
v_salary number(10);
begin
select e_salary,ename into v_salary,v_name from EMP1 where eid=3;
dbms_output.put_line(v_name||' has salary '||v_salary);
end;
/

You might also like