Skip to main content

Posts

Showing posts with the label sql queries

Joins In SQL Server

  SQL Joins (Inner, Left, Right and Full Join) SQL Join  operation combines data or rows from two or more tables based on a common field between them. In this article, we will learn about  Joins in SQL,  covering JOIN types, syntax, and examples. SQL JOIN SQL JOIN clause is used to query and access data from multiple tables by establishing logical relationships between them. It can access data from multiple tables simultaneously using common key values shared across different tables.  We can use SQL JOIN with multiple tables. It can also be paired with other clauses, the most popular use will be using JOIN with  WHERE clause   to filter data retrieval. SQL JOIN Example Consider the two tables below as follows:  Student: StudentCourse  : Both these tables are connected by one common key (column) i.e  ROLL_NO . We can perform a JOIN operation using the given SQL query: SELECT s.roll_no, s.name, s.address, s.phone, s.age, sc.course_id FROM ...