Skip to content
VUBuddy

CS405 Midterm Current Solved Subjective by Maha

Database Programming using Oracle 11g PDF 4.3 MBUpdated 23 Oct 2026
Midterm past paper CS405 Midterm Current Solved Subjective by Maha PDF 4.3 MB
vubuddy.com
Type
Midterm past paper
Course
CS405 Database Programming using Oracle 11g
Size
PDF 4.3 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 4.3 MB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 15. Download the file for all 15 pages.

✅ Example:

DECLARE

👉 Output (if salary = 5000):

High Salary

1. Syntax of IF-THEN-ELSE Statement

The IF-THEN-ELSE statement in PL/SQL is used for conditional execution.

✅ Syntax:

IF condition THEN -- Execute when condition is TRUE ELSE -- Execute when condition is FALSE END IF;

salary NUMBER := 5000; BEGIN IF salary > 4000 THEN DBMS_OUTPUT.PUT_LINE(' High Salary'); ELSE DBMS_OUTPUT.PUT_LINE(' Low Salary'); END IF; END;

Explanation:

2. Syntax of HAVING Clause

The HAVING clause is used in SQL to filter groups of records created by the GROUP BY clause.

✅ Syntax:

SELECT column_name, COUNT(*)

FROM table_name

GROUP BY column_name

HAVING condition;

✅ Example:

SELECT deptno, AVG(salary) FROM employees GROUP BY deptno HAVING AVG(salary) > 50000;

� GROUP BY deptno groups records based on department number. � HAVING AVG(salary) > 50000 filters only those departments where average salary is greater than 50,000.

WHERE is used to filter individual rows. HAVING is used to filter groups after aggregation.

3. Difference between Primary Key and Unique Key

✅ Example Table:

CREATE TABLE employees (

👉 Output: Returns the total number of employees.

✅ Example of GROUP BY Clause

✅ Example of GROUP FUNCTION (No GROUP BY)

SELECT COUNT(*) FROM employees;

1. Difference Between GROUP FUNCTION and GROUP BY Clause

emp_id NUMBER PRIMARY KEY, Unique) email VARCHAR2(100) UNIQUE Allowed, Unique) --Primary Key (No NULL,

--Unique Key (NULL

All CS405 files →
CS405 Database Programming using Oracle 11g All CS405 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.