๐ Hands-on SQL Practice with Oracle Live SQL (Step-by-Step)
I recently spent some time practicing SQL on Oracle Live SQL, and I want to share my journey with screenshots and code snippets. This exercise helped me understand DDL, DML, constraints, functions, joins, views, and stored procedures in a very practical way.
1๏ธโฃ Creating Tables (DDL)
I started by creating the core tables: Students, Courses, Enrollments, and Faculty.
๐ธ Screenshot:
2๏ธโฃ Inserting Data (DML)
I inserted a few sample students into the Students table.
๐ธ Screenshot:
I added a new column PhoneNo to the Students table.
๐ธ Screenshot:
4๏ธโฃ Constraints
I applied a CHECK constraint on the Courses table to ensure credits are always between 1 and 5.
๐ธ Screenshot:
5๏ธโฃ Using SQL Functions
I practiced string functions by displaying student names in uppercase and checking the length of their emails.
๐ธ Screenshot:
How to use DDL, DML, ALTER, and constraints effectively.
How to write aggregate queries and apply functions.
The importance of joins and views in simplifying queries.
A small stored procedure can automate updates like grade changes.
๐ฏ Next Steps
Iโll continue by experimenting with:
More complex joins (multi-table joins).
Writing nested queries and subqueries.
Exploring PL/SQL blocks for logic inside the database.
Top comments (0)