SQL Short Note
SQL Short Note
SQL Short Note
Filtering Data
WHERE clause basics
Comparison operators (=, <>, >, <, >=, <=)
Logical operators (AND, OR, NOT)
Using BETWEEN, IN, LIKE, and IS NULL
Chapter 3: SQL Functions and Expressions
Single-Row Functions
Character functions (UPPER, LOWER, SUBSTR, LENGTH, etc.)
Number functions (ROUND, TRUNC, MOD, etc.)
Date functions (SYSDATE, TO_DATE, ADD_MONTHS, etc.)
Conversion functions (TO_CHAR, TO_NUMBER, TO_DATE)
Aggregate Functions
COUNT, SUM, AVG, MAX, MIN
Using GROUP BY and HAVING clauses
Joins
Introduction to joins
Inner joins
Outer joins (LEFT, RIGHT, FULL)
Cross joins and self joins
Subqueries
Single-row subqueries
Multiple-row subqueries
Correlated subqueries
EXISTS and NOT EXISTS
INSERT Statement
Basic INSERT
Inserting multiple rows
Inserting data from another table
UPDATE Statement
Basic UPDATE
Conditional UPDATE
Updating multiple columns
DELETE Statement
Basic DELETE
Conditional DELETE
MERGE Statement
Introduction to MERGE
Use cases for MERGE
Creating Tables
Basic CREATE TABLE syntax
Data types in Oracle
Constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL)
Altering Tables
ADD, MODIFY, DROP columns
Adding and dropping constraints
Dropping Tables
Basic DROP TABLE syntax
CASCADE constraints
Indexes
Creating indexes
Types of indexes (B-tree, Bitmap)
Dropping indexes
Views
Creating views
Using views in queries
Updating data through views
Dropping views
Sequences
Creating sequences
Using sequences in INSERT statements
Altering and dropping sequences
Transactions
COMMIT, ROLLBACK, and SAVEPOINT
Understanding transaction control
Concurrency Control
Locks in Oracle (Row-level, Table-level)
Deadlocks and how to avoid them
Introduction to PL/SQL
Advantages of PL/SQL
PL/SQL block structure
Anonymous blocks
Control Structures
Conditional statements (IF, CASE)
Loops (LOOP, WHILE, FOR)
Cursors
Implicit and explicit cursors
Cursor attributes
FOR UPDATE and WHERE CURRENT OF
Exceptions
Predefined exceptions
User-defined exceptions
Exception handling
Triggers
Types of triggers (BEFORE, AFTER, INSTEAD OF)
Row-level vs. statement-level triggers
Creating and managing triggers
Packages
Creating packages
Package specification and body
Using package variables and functions
Query Optimization
Understanding execution plans
Using indexes effectively
Analyzing and optimizing queries
Backup Strategies
Logical backups (Data Pump, Export/Import)
Physical backups (RMAN)
Recovery Strategies
Recovering from logical failures
Recovering from physical failures
Partitioning
Types of partitioning (Range, List, Hash, Composite)
Creating partitioned tables
Managing partitions
Materialized Views
Creating and refreshing materialized views
Using materialized views for performance improvement
Oracle Certification
Overview of Oracle SQL certification paths
Preparation tips and resources
Taking the exam
Continuing Education
Advanced Oracle courses and resources
Staying updated with Oracle technologies
Joining Oracle communities and forums