Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Cursor Employee Table. [Table create, insert and display]
DROP TABLE EmployeeTab\\ CREATE TABLE EmployeeTab (id NUMBER(3),name VARCHAR2(20),location VARCHAR2(20),city VARCHAR2(20),sal NUMBER(8))\\ TRUNCATE TABLE EmployeeTab\\ INSERT INTO EmployeeTab VALUES (101,'Hennry','Main Road','Mumbai',14000)\\ INSERT INTO EmployeeTab VALUES (102,'Moana','MG Road','Bangalore',23000)\\ INSERT INTO EmployeeTab VALUES (103,'Rahul','Cross Road','Manali',2500)\\ INSERT INTO EmployeeTab VALUES (104,'Hanna','L&T Road','Delhi',50000)\\ INSERT INTO EmployeeTab VALUES (105,'Briana','TTK Road','Bangalore',92000)\\ INSERT INTO EmployeeTab VALUES (106,'Chris','L&T Road','Delhi',60400)\\ SELECT * FROM EmployeeTab\\ DECLARE CURSOR EmpCur IS SELECT * FROM EmployeeTab; BEGIN FOR EmpRec IN EmpCur LOOP dbms_output.put_line(' <*( )*> /\*\ Employee Id : '||EmpRec.id); dbms_output.put_line(' \*\/*/ /*/\*\ Employee Name : '||EmpRec.name); dbms_output.put_line(' \*\/ <*( )*> Employee Location : '||EmpRec.location); dbms_output.put_line(' /\*\ \*\/*/ Employee City : '||EmpRec.city); dbms_output.put_line(' /*/\*\ \*\/ '); END LOOP; END;
run
|
edit
|
history
|
help
0
5
g
add pl/sql
sum of array in pl/sql
Srinivas
DBMS
Srinivas
Srinivas
display table 5 for using for loop
admt