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

      CodeSOD: A Unique Way to Primary Key

      July 22, 2025

      BrowserStack launches Figma plugin for detecting accessibility issues in design phase

      July 22, 2025

      Parasoft brings agentic AI to service virtualization in latest release

      July 22, 2025

      Node.js vs. Python for Backend: 7 Reasons C-Level Leaders Choose Node.js Talent

      July 21, 2025

      The best CRM software with email marketing in 2025: Expert tested and reviewed

      July 22, 2025

      This multi-port car charger can power 4 gadgets at once – and it’s surprisingly cheap

      July 22, 2025

      I’m a wearables editor and here are the 7 Pixel Watch 4 rumors I’m most curious about

      July 22, 2025

      8 ways I quickly leveled up my Linux skills – and you can too

      July 22, 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

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025
      Recent

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025

      Zero Trust & Cybersecurity Mesh: Your Org’s Survival Guide

      July 22, 2025

      Execute Ping Commands and Get Back Structured Data in PHP

      July 22, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025
      Recent

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025

      “I don’t think I changed his mind” — NVIDIA CEO comments on H20 AI GPU sales resuming in China following a meeting with President Trump

      July 22, 2025

      Galaxy Z Fold 7 review: Six years later — Samsung finally cracks the foldable code

      July 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

    GPT-5 is Coming: Revolutionizing Software Testing

    July 22, 2025
    Development

    Win the Accessibility Game: Combining AI with Human Judgment

    July 22, 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

    KB5058499 finally makes Windows 11 24H2 stable for gaming, and it wasn’t Nvidia’s fault

    Operating Systems

    CVE-2025-0917 – IBM Cognos Analytics Stored Cross-Site Scripting

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-3988 – TOTOLINK N150RT Buffer Overflow Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-4236 – PCMan FTP Server MDIR Command Handler Buffer Overflow Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    CVE-2025-7126 – iSourcecode Employee Management System SQL Injection Vulnerability

    July 7, 2025

    CVE ID : CVE-2025-7126

    Published : July 7, 2025, 12:15 p.m. | 54 minutes ago

    Description : A vulnerability, which was classified as critical, has been found in itsourcecode Employee Management System up to 1.0. Affected by this issue is some unknown functionality of the file /admin/adminprofile.php. The manipulation of the argument AdminName leads to sql injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.

    Severity: 6.3 | MEDIUM

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    Fastify (Node.Js Framework): The Secret to Creating Scalable and Secure Business Applications

    May 29, 2025

    CVE-2025-48187 – RAGFlow Authentication Bypass

    May 17, 2025

    Hire AI Developers to Integrate Blockchain and AI for Secure Business Operations🔐

    June 5, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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