This PL/SQL code retrieves an employee's name, join date, and designation from an employee database based on an employee number input by the user. It declares variables to store the employee number input, and the name, hire date, and job retrieved from the database. It then performs a SELECT query to get those fields for the matching employee number and outputs the results.
This PL/SQL code retrieves an employee's name, join date, and designation from an employee database based on an employee number input by the user. It declares variables to store the employee number input, and the name, hire date, and job retrieved from the database. It then performs a SELECT query to get those fields for the matching employee number and outputs the results.
This PL/SQL code retrieves an employee's name, join date, and designation from an employee database based on an employee number input by the user. It declares variables to store the employee number input, and the name, hire date, and job retrieved from the database. It then performs a SELECT query to get those fields for the matching employee number and outputs the results.
SIES College of Management Studies SYMCA, Semester III, Roll No: 18
DBMS Assignment No. 7
3)Write a PL/SQL code to retrieve the employee name, join_date, and designation from employee database of an employee whose number is input by the user. Code: declare no int := &no; name employees.ename%TYPE; H_Date employees.hiredate%TYPE; job employees.job%TYPE; begin SELECT ename,hiredate,job INTO name, H_Date, job from employees where empno = no; dbms_output.put_line('Name : ' || name || ', Join Date : ' || H_Date || ', Designation : ' || job ); end; / Output:
Subject: MCA L301[Choice Based]Database Management System Lab Nov 2020