Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Classic WTF: Take the Bus

      June 23, 2025

      Decoding The SVG path Element: Curve And Arc Commands

      June 23, 2025

      This week in AI dev tools: Gemini 2.5 Pro and Flash GA, GitHub Copilot Spaces, and more (June 20, 2025)

      June 20, 2025

      Gemini 2.5 Pro and Flash are generally available and Gemini 2.5 Flash-Lite preview is announced

      June 19, 2025

      Finally, a Lenovo ThinkPad that impressed me in performance, design, and battery life

      June 23, 2025

      3 productivity gadgets I can’t work without (and why they make such a big difference)

      June 23, 2025

      The best password manager for families in 2025: Expert tested and reviewed

      June 23, 2025

      My Apple Watch band gave out before year two – and it could’ve been bad

      June 23, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      SQL Joins

      June 23, 2025
      Recent

      SQL Joins

      June 23, 2025

      Dividing Collections with Laravel’s splitIn Helper

      June 23, 2025

      PayHere for Laravel

      June 23, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      TeleSculptor – transforms aerial videos and images into Geospatial 3D models

      June 23, 2025
      Recent

      TeleSculptor – transforms aerial videos and images into Geospatial 3D models

      June 23, 2025

      OpenLiteSpeed – HTTP server

      June 23, 2025

      I used Lenovo’s latest dual-screen OLED laptop for a month and it wouldn’t be my first choice — here’s why

      June 22, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»SQL Joins

    SQL Joins

    June 23, 2025

    A Join clause is used to combine two or more tables in a database by merging the records from the tables based on a related column between them.

    Example JOIN using two tables: employees and departments

    employees table:

    id emp_name department_id joining_date
    1 Anuj kumar 101 2025-01-01
    2 Rahul Singh 102 2025-02-16
    3 John Doe 102 2025-02-25
    4 Alex 104 2025-04-20
    5 Alice null 2025-05-24
    6 Garima 110 2025-05-28

    departments tables:

    id department_name
    101 IT
    102 HR
    103 Accounts
    104 Operations
    105 Marketing
    106 Legal

    Example

    SELECT employees.id,employees.emp_name, departments.department_name
    FROM employees
    JOIN departments
    ON employees.department_id = departments.id;

     Output will be:

    id emp_name department_name
    1 Anuj kumar IT
    2 Rahul Singh HR
    3 John Doe HR
    4 Alex Operations

    Only rows where department_id matches departments.id are shown.

    Alice is excluded because department_id is NULL.

    Garima is also excluded because 110 does not exist in the departments table.

    There are five common types of SQL JOINs:

    Inner Join: Returns only the rows with matching values in both tables.

    Right Outer Join: Returns all rows from the right table and matched rows from the left table; unmatched left-side values are NULL.

    Left Outer Join: Returns all rows from the left table and matched rows from the right table; unmatched right-side values are NULL.

    Full outer Join: Returns all rows when there is a match in one of the tables; unmatched rows from both sides are filled with NULL.

    Cross Join: Returns the Cartesian product of both tables (every row from the first table joined with every row from the second).

    The post SQL Joins appeared first on PHPGurukul.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleDividing Collections with Laravel’s splitIn Helper
    Next Article LLMs factor in unrelated information when recommending medical treatments

    Related Posts

    Development

    Why I recommend this flagship TCL TV over OLED models that cost more (and don’t regret it)

    June 23, 2025
    Artificial Intelligence

    Introducing Gemma 3

    June 23, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-6302 – TOTOLINK EX1200T Stack-Based Buffer Overflow Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-22883 – Delta Electronics ISPSoft Out-Of-Bounds Write Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    King Bob pleads guilty to Scattered Spider-linked cryptocurrency thefts from investors

    Development

    PC shipments spike as Windows 10’s end and U.S. tariffs loom

    News & Updates

    Highlights

    CVE-2025-25014 (CVSS 9.1): Prototype Pollution in Kibana Opens Door to Code Execution

    May 7, 2025

    CVE-2025-25014 (CVSS 9.1): Prototype Pollution in Kibana Opens Door to Code Execution

    Elastic has issued a critical security advisory for Kibana, warning users of a vulnerability tracked as CVE-2025-25014. Scoring a CVSS of 9.1, this flaw stems from a prototype pollution vulnerability …
    Read more

    Published Date:
    May 07, 2025 (3 hours, 11 minutes ago)

    Vulnerabilities has been mentioned in this article.

    CVE-2025-25014

    CVE-2024-12556

    CVE-2025-25015

    CVE-2024-43707

    CVE-2024-11120

    CVE-2024-37285

    CVE-2024-37288

    CVE-2024-37287

    CVE-2024-6047

    CVE-2025-4323 – Apache MRCMS Cross Site Scripting Vulnerability

    May 6, 2025

    CVE-2025-5990 – Crafty Controller Stored XSS Vulnerability

    June 15, 2025

    CVE-2025-4065 – ScriptAndTools Online-Travling-System Remote Improper Access Control Vulnerability

    April 29, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.