Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

SQL / PL-SQL

Section weight: Typically 5–10 marks. GROUP BY + HAVING and subqueries appear in almost every paper.

This folder covers SQL querying and PL/SQL programming for TCS IPA.

What's Inside

File Content
SQL-COMPLETE-GUIDE.md Full reference — DDL, DML, joins, subqueries, aggregate functions, PL/SQL blocks, cursors
sql_plsql_notes.md Concise revision notes

High-Priority Topics

Topic Why It Matters
GROUP BY + HAVING Almost always tested — filter aggregated results
JOIN types (INNER, LEFT, RIGHT, FULL) Frequently asked with diagram-based MCQs
Subqueries Correlated vs non-correlated, IN, NOT IN, EXISTS
Aggregate functions COUNT, SUM, AVG, MAX, MIN
ORDER BY Ascending (default) vs descending
PL/SQL IF/ELSIF/ELSE Decision logic in stored blocks
Cursors Implicit vs explicit, OPEN, FETCH, CLOSE
SAVEPOINT / ROLLBACK Transaction control — mark intermediate points

Quick Reference

-- Find departments with more than 3 employees
SELECT dept, COUNT(*) AS total
FROM employees
GROUP BY dept
HAVING COUNT(*) > 3;

-- Second highest salary
SELECT MAX(salary)
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);

Back to root