The document creates a user named tejas, inserts data into the EMP1 table, runs queries to retrieve data from the EMP1 table including the salary for employee with id 2 and names and salary for employee with id 3, and outputs the results. It defines PL/SQL blocks to declare and assign variables used to store and output the retrieved values.
The document creates a user named tejas, inserts data into the EMP1 table, runs queries to retrieve data from the EMP1 table including the salary for employee with id 2 and names and salary for employee with id 3, and outputs the results. It defines PL/SQL blocks to declare and assign variables used to store and output the retrieved values.
The document creates a user named tejas, inserts data into the EMP1 table, runs queries to retrieve data from the EMP1 table including the salary for employee with id 2 and names and salary for employee with id 3, and outputs the results. It defines PL/SQL blocks to declare and assign variables used to store and output the retrieved values.
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; /