Hello, Pals !!

Welcome to Learner Loft, your ultimate destination for all things tech! Whether you’re a seasoned developer, a budding programmer, or simply passionate about technology, Learner Loft is your one-stop-shop for the latest articles and insights on HTML, SQL, Oracle APEX, and more. Our mission is to empower tech enthusiasts with the knowledge and resources they need to stay informed, inspired, and ahead of the curve. We believe that technology has the power to transform lives and drive innovation, and we’re committed to sharing our passion for tech with our community.

What is SQL, Data and Database with examples

Imagine you have a big collection of toys scattered all over your room. You want to find your favorite toy, but searching through the mess by yourself might take a lot of time and effort. Here’s where your friend SQL comes in! SQL is like having a magic wand that helps you organize and find your toys quickly and easily. It stands for Structured Query Language, but you can just think of it as a special language that lets you talk to a smart toy organizer....

April 5, 2024 · 4 min · Ashwini Shalke

SQL language — DDL, DML, DCL, and TCL

DDL (Data Definition Language): DDL is used to define and manage the structure of database objects. Here are some common DDL commands: CREATE: Used to create new database objects such as tables, views, indexes, etc. ALTER: Used to modify the structure of existing database objects, such as adding, modifying, or dropping columns. Here are few examples :- 1.Adding a new column: This command adds a new column named “Email” to the “Students” table with a data type of VARCHAR(100)....

April 5, 2024 · 2 min · Ashwini Shalke

Basic SQL Queries — SELECT, WHERE,UPDATE and DELETE

Think of SQL queries as requests you make to find specific snacks in your snack box. Just like asking your friend to find your favorite candy in the snack box, SQL queries help you find specific information from a database. Example: Let’s say you have a table that lists all your favorite snacks and their quantities in your snack box, like this: Now, using SQL queries, you can ask questions to find out specific information from this table....

April 8, 2024 · 2 min · Ashwini Shalke

For Beginners — TCL Commands in SQL with Example

TCL commands are COMMIT, ROLLBACK, and SAVEPOINT. COMMIT: The COMMIT command is used to permanently save the changes made during the current transaction. Once a COMMIT command is executed, all changes made within the transaction become permanent and are visible to other users. Example: Suppose we have a transaction that updates the age of a student in the database: BEGIN TRANSACTION; UPDATE Students SET Age = 16 WHERE Name = 'Alice'; COMMIT; In this example:...

April 8, 2024 · 3 min · Ashwini Shalke

Window Functions in SQL

Window functions are a type of function in SQL that allow you to perform calculations across a set of rows related to the current row, called a “window,” without collapsing the result set. They are used to perform aggregate calculations (like sum, average, count) and ranking operations (like row number, rank) within a specific partition or window of data. Syntax Types of Window Functions: There are a few common window functions you might encounter:...

April 10, 2024 · 2 min · Ashwini Shalke

SQL Clause: Group By, Having, IN and NOT IN

Let’s say we have a table named “Games” with the following data: GROUP BY: Think of GROUP BY like organizing your games into groups based on their ratings. It’s like sorting them into piles of similar ratings. SELECT Rating, COUNT(\*) AS NumOfGames FROM Games GROUP BY Rating; This query will count the number of games for each rating group. For example, it will show how many games have a rating of 4....

April 8, 2024 · 2 min · Ashwini Shalke

Aggregate Functions in SQL

Imagine you’re at a party with a bunch of friends, and there’s a big bowl of candies on the table. Now, you want to know some information about those candies, like how many candies are there in total, what’s the average number of candies each person has, or which friend has the most candies. In SQL, aggregate functions are like magical candy counters that help you answer these questions by performing calculations on groups of data....

April 8, 2024 · 2 min · Ashwini Shalke

User-Defined Function (UDF) in SQL

Let’s say, you have a special calculator that can perform a specific calculation, like doubling a number or calculating the average of a set of numbers. You can use this calculator whenever you need to perform that calculation, without having to write out the steps each time. In SQL, a user-defined function is like that special calculator — it’s a custom function that you can create to perform a specific task or calculation....

April 11, 2024 · 2 min · Ashwini Shalke

What is Stored Procedure in SQL

Imagine you’re baking a cake, and you have a recipe written down on a piece of paper. This recipe contains all the steps you need to follow to bake the cake, from mixing the ingredients to putting it in the oven. A stored procedure in SQL is like that recipe — it’s a set of instructions stored in the database that you can execute whenever you need to perform a specific task or set of tasks....

April 11, 2024 · 2 min · Ashwini Shalke

Difference between Function and stored procedure in SQL

Stored Procedures: Execution: Stored procedures may or may not return a value. They can execute a series of SQL statements or perform actions such as data manipulation or transaction management. Usage: Stored procedures are used to encapsulate a set of SQL statements for reuse and maintainability. They can be called from client applications or other stored procedures. Modifications: Stored procedures can include data manipulation operations, transaction control, conditional logic, and error handling....

April 11, 2024 · 2 min · Ashwini Shalke