0% found this document useful (0 votes)
4 views

Practical6

JAVA PRACTICAL

Uploaded by

skdisha6
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Practical6

JAVA PRACTICAL

Uploaded by

skdisha6
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

DBMS Practical List – 6

Platform: Oracle Express

1. Logon to Oracle by user name given to you.


2. See list of tables by using “Tab”
3. View the user name, make sure its ur login name.
4. Create a table “Employee_section” with following attributes :
Field Name Type Size
EmpCode Number
Name varchar2 6
Salary Number
5. Display the structure of table
6. see the records of the table
7. Insert the following data into the table

EmpCode Name Salary


101 Amit 30000
201 Kapil 22000
301 Rohit 45000
401 Amit 27000
401 Amit 27000
 Commit the data (Do not Forget)
8. See the records of the table.
9. Try to Add the following new record

EmpCode Name Salary


901 Bhattacharya 33000
Note the output, even if it is error
10. See the structure of table and note the size of name column
11. Increase the size of name column to 25.
12. See the structure of table again.
13. See the records of table.
14. Now again try to add the above record again,
15. see the records of the table
16. Reduce the size of name column to 5.
17. Commit the data and see all records.
18. Display name, actual salary and 50 % increased salary of all employees.
19. Execute the following queries and note the result:
a) Select name from employee.
b) Select name, name, name, name, name from employee.
c) Select name, empcode from employee order by salary.
d) Select name, Salary , salary + 500 , salary-50000 from employee.
e) select sum(salary) from employee;
f) Select min(salary) from employee;
g) Select max(salary) from employee;

20. Make a copy of employee table as “NewEmp_section” table with all records.
21. See the records of “NewEmp_section” table.
22. Make a copy of employee table as “Emp2_section” table with no (Zero) records.
23. See the records of all 3 table (Employee, NewEmp_section and Emp2_section).
24. See the structure of all 3 table (Employee, NewEmp_section and Emp2_section).
25. Create a new table “MyTable_section” from employee_section table with only
Name and Salary columns.
26. See the records of Employee Table and MyTable_section.
27. See the list of all tables.
28. Commit your data.
29. Drop the columns “name” and “empcode” from NewEmp_section table.
30. See the records of NewEmp_section Table.
31. Truncate the “MyTable_section” table. (do not use delete or DROP command).
32. See the records of “MyTable_section” table.
33. Rollback.
34. Again See the records of “MyTable_section” table. (What is your observation?)
35. Drop the “MyTable_section” table.
36. See the records of “MyTable_section” table.
37. Rollback.
38. Again See the records of “MyTable_section” table. (What is your observation?)
39. See the list of all tables in our login.
40. Commit the data.

You might also like