Вы находитесь на странице: 1из 3

Assignment- 4

Sr.N O 48 TOPIC a) Create table employee Field Name Field Type size constraints emp_no number 4 primary key ename varchar2 20 Designationvarchar2 10 Hiredate date Salary number 7,2 Incentive number 7 Modify the definition of an existing size of column incentive as (5,2) (Insert atleast 10 records in a table) Add the following constraints: Default on column incentive as 0 value. Add a new column ph_no(7,0) Insert a new row with ename as null Write a command to view the constraints of the table along with the column name. Find out the employees whose incentive is null Update the salary with 500 Rs. Find out the experience of each employee in the company. Find out the average salary of the employees Find out the name and sum of salary and incentives of each employee and give the alias name as gross_salary Count the number of employees who got 0 incentives. Count the number of employees Count the number of jobs in the company. Find out the employee who who got maximum annual salary. Find out the name and salary of each employee. (Display should be like this: ename salary is salary) List all the employees who are not professor sorted by name. Count the number of employees whose experience>5 Find out the name and length of name for each employee. Display the hiredate of each employee. Eg: 12thPAG ENO. SIGNATU RE

49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

67 68 69

Apr-97 Find the date ,15 days after todays date. Display the hire date as spelling. E.g.: one, twelve etc Find out the username and user id.

Assignment- 5
Sr.N O 70 71 72 73 74 TOPIC Write a PL/SQL program to determine the given number is even or odd. Write a PL/SQL program to find the factorial of any given number. Write a PL/SQL program that explains the functioning of pre-defined Exception. Write a PL/SQL program that explains the functioning of user-defined Exception. Write a PL/SQL program to calculate area of circle for a value of radius varying from 2 to 10. Store the radius and their corresponding values of calculated area in a table. Write a PL/SQL code block that will accept an account number from the keyboard. Check if the user balance is less than the minimum balance, only then deduct Rs 100/- from the balance. Write a PL/SQL clock of code for inverting a number 5639 to 9365. Create a cursor that has information about employees name and their salary. Then print the information (name and salary) on the console. Create a view of employee table for department number 10 and then display all the contents of that view. Write a PL/SQL program for implementing Arithmetic operation (simple Calculator). PAG ENO . SIGNATURE

75

76 77

78

79

80

Write a PL/SQL code block that first inserts a single record in an emp table. Update the salary of any one employee with 1000 Rs. Then check to see that total salary does not exceed 50000 Rs and if the total salary is greater than 50,000 then undo the update made. Write a user-defined function to find the square function of any given number.

81

Вам также может понравиться