2 1
2 1
2 1
DECLARE
DAY VARCHAR(15);
BEGIN
DAY :='SATURDAY';
ELSE
END IF;
END;
--QUES2
DECLARE
GRADE CHAR(1);
BEGIN
GRADE :='C';
CASE GRADE
END CASE;
END;
-- QUES 3
DECLARE
get_ctr CHAR(1) := 9;
BEGIN
IF ( get_ctr >= 'A' AND get_ctr <= 'Z' )OR ( get_ctr >= 'a'AND get_ctr <= 'z' )
THEN
ELSE
END IF;
END;
-- QUES 4
DECLARE
new_temp NUMBER;
new_scale CHAR;
BEGIN
new_temp := 0;
new_scale := 'C';
new_scale := 'F';
ELSE
new_temp := ( ( temp - 32 ) * 5 ) / 9;
new_scale := 'C';
END IF;
||new_scale
||new_temp);
END;
-- QUES5
DECLARE
i NUMBER(3);
j NUMBER(3);
BEGIN
dbms_output.new_line;
i := 2;
LOOP
j := 2;
LOOP
OR ( j = i ) );
j := j + 1;
END LOOP;
IF( j = i )THEN
dbms_output.Put(i||' ');
END IF;
i := i + 1;
END LOOP;
dbms_output.new_line;
END;
-- QUES 6
DECLARE
emp_min_salary NUMBER(6,0);
emp_max_salary NUMBER(6,0);
emp_mid_salary NUMBER(6,2);
tmp_salary EMPLOYEES.SALARY%TYPE;
tmp_emp_name EMPLOYEES.FIRST_NAME%TYPE;
BEGIN
SELECT min_salary,
max_salary
INTO emp_min_salary,
emp_max_salary
FROM JOBS
FROM EMPLOYEES
WHERE EMPLOYEE_ID = tmp_emp_id);
SELECT salary,first_name
INTO tmp_salary,tmp_emp_name
FROM employees
UPDATE employees
ELSE
UPDATE employees
END IF;
ELSE
END IF;
END;
-- QUES7
DECLARE
BEGIN
ELSE
END IF;
END;