This presentation gives a clear and concise description of joins in sql and several types of sql joins.
These slides also contains the pictorial representation as well as syntax for each type of joins.
Joins in SQL are used to combine data from two or more tables based on common columns between them. There are several types of joins, including inner joins, outer joins, and cross joins. Inner joins return rows that match between tables, outer joins return all rows including non-matching rows, and cross joins return the cartesian product between tables.
This document provides an introduction to SQL and relational database concepts. It explains that SQL is used to manipulate and retrieve data from relational databases. It also outlines the main SQL commands: DDL for data definition, DML for data manipulation, DCL for data control, and DQL for data queries. Key relational database concepts like tables, records, columns, and relationships are defined. Constraints, data types and integrity are discussed. Examples are provided for SQL statements like CREATE, INSERT, UPDATE, DELETE, and SELECT.
A SQL subquery is a query nested inside another query. Subqueries can be used in the SELECT, WHERE, INSERT, UPDATE, or DELETE clauses. The subquery executes first and its results are then used by the outer query. There are three types of subqueries: single row, multiple row, and multiple column. Single row subqueries use comparison operators like =, <, > and return one row. Multiple row subqueries use operators like IN, ANY, ALL and return multiple rows. Multiple column subqueries compare more than one column between the outer and inner queries.
toolbox and its properties in the visual basicadarsh-kaul
This document discusses the various tools available in the Visual Basic toolbox for designing user interfaces. It provides descriptions and common properties of controls like labels, textboxes, command buttons, checkboxes, option buttons, frames, listboxes, comboboxes, timers, shapes, pictures, and images. These controls can be used to build interactive forms and receive user input.
Normalization is a process used to organize data in a database. It involves breaking tables into smaller, more manageable pieces to reduce data redundancy and improve data integrity. There are several normal forms including 1NF, 2NF, 3NF, BCNF, 4NF and 5NF. The document provides examples of tables and how they can be decomposed into different normal forms to eliminate anomalies and redundancy through the creation of additional tables and establishing primary keys.
Research paper - Calamansi (Citrofortunella Microcarpa) Fruit Extract as PerfumeJulienne Mae Potonia
This document provides an introduction, statement of the problem, literature review, methodology, and procedures for a study investigating whether calamansi fruit extract can be used as a substitute for chemicals in perfumes. The study aims to develop a natural perfume using calamansi extract, which is abundant in the Philippines. The methodology will involve extracting calamansi juice and mixing it with essential oils and vodka at different concentrations to test for fragrance. Subjects will evaluate the calamansi perfumes and a commercial perfume. The researchers hypothesize that the calamansi perfume can be an effective alternative to commercial perfumes.
An interface defines a contract that specifies functionality without implementation. It defines a set of methods that classes implement. Interfaces allow for multiple inheritance by allowing a class to implement multiple interfaces. Interfaces cannot contain data members, constructors, destructors, or static members. Both interfaces and abstract classes cannot be instantiated but interfaces only define method signatures while abstract classes can contain implementations. A class implements an interface by listing the interface name after the class name and providing implementations for all interface methods.
All Types of sensor in power point presentation karansansare
This document discusses different types of sensors. It provides a chart listing various sensors like temperature sensors, color sensors, alcohol sensors, smoke sensors, ultrasonic sensors, soil moisture sensors, touch sensors, humidity sensors, rain sensors, proximity sensors, gas sensors, water flow sensors and heartbeat sensors. For each sensor, it describes what it is, its applications and working principle. The purpose is to create a chart on types of sensors for a mechatronics course.
The document discusses different types of SQL joins, including inner joins, outer joins, equi joins, non-equi joins, natural joins, cross joins, left joins, right joins, full outer joins, and self joins. It provides the syntax and examples for each type of join. It also discusses joining tables through referential integrity, where a foreign key references a primary key in another table to link the tables together.
Types Of Join In Sql Server - Join With Example In Sql Serverprogrammings guru
Do you know How many types of Joins in SQL. In this ppt presentation we are discussion about types of joins in sql server eg: INNER JOIN , SELF JOIN ,OUTER JOIN ,Right outer Join,Left outer Join,Full Outer Join,CROSS JOIN .
This document provides an overview of SQL programming including:
- A brief history of SQL and how it has evolved over time.
- Key SQL fundamentals like database structures, tables, relationships, and normalization.
- How to define and modify database structures using commands like CREATE, ALTER, DROP.
- How to manipulate data using INSERT, UPDATE, DELETE, and transactions.
- How to retrieve data using SELECT statements, joins, and other techniques.
- How to aggregate data using functions like SUM, AVG, MAX, MIN, and COUNT.
- Additional topics covered include subqueries, views, and resources for further learning.
This document provides an introduction to SQL (Structured Query Language). It defines SQL as a standard language for accessing and manipulating databases. The key points covered include:
- SQL lets you perform queries against a database to retrieve, insert, update, and delete data. It can also be used to create and modify database structures.
- Common SQL commands covered are SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, DROP TABLE.
- Additional SQL concepts explained are data types, WHERE clauses, ORDER BY clauses, GROUP BY clauses, and JOIN operations.
- RDBMS systems like MySQL, SQL Server, Oracle, etc. use SQL to communicate with the databases they manage.
Join queries combine data from two or more tables in a database. An inner join returns rows where there is a match between columns in both tables. A left join returns all rows from the left table, along with matched rows from the right table, returning null if there is no match. A right join is similar but returns all rows from the right table. A full join returns all rows and fills in nulls for missing matches between the tables.
The document discusses SQL and its functions. SQL is a language used to store, manipulate, and retrieve data in relational databases. It includes data definition language (DDL) commands like CREATE, ALTER, TRUNCATE, DROP, and RENAME to define and modify database structures. It also includes data manipulation language (DML) commands like INSERT, UPDATE, DELETE, and MERGE to manage data within databases. Examples of each command are provided.
The document discusses various SQL concepts like views, triggers, functions, indexes, joins, and stored procedures. Views are virtual tables created by joining real tables, and can be updated, modified or dropped. Triggers automatically run code when data is inserted, updated or deleted from a table. Functions allow reusable code and improve clarity. Indexes allow faster data retrieval. Joins combine data from different tables. Stored procedures preserve data integrity.
This document discusses different types of joins in SQL including inner joins, self joins, outer joins, and cross joins. An inner join combines rows from two tables based on a common column and returns matched rows. A self join performs an inner join on a single table to match rows with itself. Outer joins return all rows from one or both tables whether or not they have a match. A cross join returns the Cartesian product of all rows in two tables.
SQL is a standard language for querying and manipulating data in relational databases. It contains five categories of statements: data definition language (DDL) for defining data structure, data manipulation language (DML) for managing data, data control language (DCL) for privileges, transaction control statements for transactions, and session control statements for sessions. Common DDL commands include CREATE, ALTER, and DROP for databases and tables. Common DML commands include SELECT, INSERT, UPDATE, and DELETE for querying and modifying data. Joins are used to combine data from two or more tables.
in this presentation the commands let you help to understand the basic of the database system software. how to retrieve data, how to feed data and manipulate it very efficiently by using this commands.
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
This document discusses different types of SQL functions including string, numeric, conversion, group, date/time, and user-defined functions. It provides examples of common string functions like UPPER, LENGTH, SUBSTR. Numeric functions covered include ABS, ROUND, POWER. Group functions include AVG, COUNT, MAX, MIN, SUM. Date functions allow conversion and calculation involving dates. The document demonstrates how to create scalar and table-valued user-defined functions in SQL.
The document discusses various SQL statements and functions used for managing databases and querying data. It provides the syntax for SQL statements like CREATE TABLE, INSERT, SELECT, UPDATE, DELETE and functions like COUNT, AVG, MIN, MAX, SUM to operate on data in database tables. It also covers statements for altering tables, joining tables, filtering rows with WHERE and HAVING clauses, removing duplicates with DISTINCT, and ordering results.
Triggers are stored procedures that are automatically executed in response to data modification events like insert, update or delete on a table. There are two types of triggers - DML triggers which respond to data manipulation statements, and DDL triggers which respond to data definition language statements like create, alter or drop. Triggers can be used to perform validation, auditing or other actions in response to data changes. They can be disabled, enabled or modified as needed using SQL statements.
This presentation is on SQL constraints. This presentation was used by me in my YouTube vlog on SQL constraints. Vlog link: https://youtu.be/E94YFmATqb4
PL/SQL is Oracle's standard language for accessing and manipulating data in Oracle databases. It allows developers to integrate SQL statements with procedural constructs like variables, conditions, and loops. PL/SQL code is organized into blocks that define a declarative section for variable declarations and an executable section containing SQL and PL/SQL statements. Variables can be scalar, composite, reference, or LOB types and are declared in the declarative section before being used in the executable section.
The document discusses different types of SQL joins, including inner joins, outer joins, equi joins, non-equi joins, natural joins, cross joins, left joins, right joins, full outer joins, and self joins. It provides the syntax and examples for each type of join. It also discusses joining tables through referential integrity, where a foreign key references a primary key in another table to link the tables together.
Types Of Join In Sql Server - Join With Example In Sql Serverprogrammings guru
Do you know How many types of Joins in SQL. In this ppt presentation we are discussion about types of joins in sql server eg: INNER JOIN , SELF JOIN ,OUTER JOIN ,Right outer Join,Left outer Join,Full Outer Join,CROSS JOIN .
This document provides an overview of SQL programming including:
- A brief history of SQL and how it has evolved over time.
- Key SQL fundamentals like database structures, tables, relationships, and normalization.
- How to define and modify database structures using commands like CREATE, ALTER, DROP.
- How to manipulate data using INSERT, UPDATE, DELETE, and transactions.
- How to retrieve data using SELECT statements, joins, and other techniques.
- How to aggregate data using functions like SUM, AVG, MAX, MIN, and COUNT.
- Additional topics covered include subqueries, views, and resources for further learning.
This document provides an introduction to SQL (Structured Query Language). It defines SQL as a standard language for accessing and manipulating databases. The key points covered include:
- SQL lets you perform queries against a database to retrieve, insert, update, and delete data. It can also be used to create and modify database structures.
- Common SQL commands covered are SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, DROP TABLE.
- Additional SQL concepts explained are data types, WHERE clauses, ORDER BY clauses, GROUP BY clauses, and JOIN operations.
- RDBMS systems like MySQL, SQL Server, Oracle, etc. use SQL to communicate with the databases they manage.
Join queries combine data from two or more tables in a database. An inner join returns rows where there is a match between columns in both tables. A left join returns all rows from the left table, along with matched rows from the right table, returning null if there is no match. A right join is similar but returns all rows from the right table. A full join returns all rows and fills in nulls for missing matches between the tables.
The document discusses SQL and its functions. SQL is a language used to store, manipulate, and retrieve data in relational databases. It includes data definition language (DDL) commands like CREATE, ALTER, TRUNCATE, DROP, and RENAME to define and modify database structures. It also includes data manipulation language (DML) commands like INSERT, UPDATE, DELETE, and MERGE to manage data within databases. Examples of each command are provided.
The document discusses various SQL concepts like views, triggers, functions, indexes, joins, and stored procedures. Views are virtual tables created by joining real tables, and can be updated, modified or dropped. Triggers automatically run code when data is inserted, updated or deleted from a table. Functions allow reusable code and improve clarity. Indexes allow faster data retrieval. Joins combine data from different tables. Stored procedures preserve data integrity.
This document discusses different types of joins in SQL including inner joins, self joins, outer joins, and cross joins. An inner join combines rows from two tables based on a common column and returns matched rows. A self join performs an inner join on a single table to match rows with itself. Outer joins return all rows from one or both tables whether or not they have a match. A cross join returns the Cartesian product of all rows in two tables.
SQL is a standard language for querying and manipulating data in relational databases. It contains five categories of statements: data definition language (DDL) for defining data structure, data manipulation language (DML) for managing data, data control language (DCL) for privileges, transaction control statements for transactions, and session control statements for sessions. Common DDL commands include CREATE, ALTER, and DROP for databases and tables. Common DML commands include SELECT, INSERT, UPDATE, and DELETE for querying and modifying data. Joins are used to combine data from two or more tables.
in this presentation the commands let you help to understand the basic of the database system software. how to retrieve data, how to feed data and manipulate it very efficiently by using this commands.
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
This document discusses different types of SQL functions including string, numeric, conversion, group, date/time, and user-defined functions. It provides examples of common string functions like UPPER, LENGTH, SUBSTR. Numeric functions covered include ABS, ROUND, POWER. Group functions include AVG, COUNT, MAX, MIN, SUM. Date functions allow conversion and calculation involving dates. The document demonstrates how to create scalar and table-valued user-defined functions in SQL.
The document discusses various SQL statements and functions used for managing databases and querying data. It provides the syntax for SQL statements like CREATE TABLE, INSERT, SELECT, UPDATE, DELETE and functions like COUNT, AVG, MIN, MAX, SUM to operate on data in database tables. It also covers statements for altering tables, joining tables, filtering rows with WHERE and HAVING clauses, removing duplicates with DISTINCT, and ordering results.
Triggers are stored procedures that are automatically executed in response to data modification events like insert, update or delete on a table. There are two types of triggers - DML triggers which respond to data manipulation statements, and DDL triggers which respond to data definition language statements like create, alter or drop. Triggers can be used to perform validation, auditing or other actions in response to data changes. They can be disabled, enabled or modified as needed using SQL statements.
This presentation is on SQL constraints. This presentation was used by me in my YouTube vlog on SQL constraints. Vlog link: https://youtu.be/E94YFmATqb4
PL/SQL is Oracle's standard language for accessing and manipulating data in Oracle databases. It allows developers to integrate SQL statements with procedural constructs like variables, conditions, and loops. PL/SQL code is organized into blocks that define a declarative section for variable declarations and an executable section containing SQL and PL/SQL statements. Variables can be scalar, composite, reference, or LOB types and are declared in the declarative section before being used in the executable section.
The document discusses different types of SQL joins, including inner joins, left outer joins, right outer joins, and full outer joins. It explains that SQL joins combine records from two or more tables based on common values. The syntax of a SQL join uses the SELECT statement to identify columns from both tables, the FROM clause to list the tables, and the ON clause to specify the common column between the tables that is used to link the records.
joins and subqueries in big data analysisSanSan149
This document discusses joins and subqueries in SQL for big data analysis. It defines different types of SQL joins such as inner, left, right, and full outer joins. It explains that joins combine rows from two or more tables based on related columns. It also defines subqueries as queries nested within other SQL statements, most commonly in the WHERE clause, and notes they must be enclosed in parentheses and placed on the right side of a comparison operator.
Joins are used to combine data from multiple tables and come in several types. The main types are inner joins, left joins, right joins, full joins, and self joins. Inner joins return rows where there are matches in both tables, left joins return all rows from the left table even if no match exists in the right table, and right joins are the opposite of left joins. Full joins are not directly supported in MySQL and require a combination of joins and unions. Self joins match a table to itself.
SQL JOIN allows combining rows from multiple tables based on related columns. There are different types of joins: inner joins return matching rows; left and right outer joins return all rows from the left/right table and matching rows from the right/left table; full outer joins return all rows when there are matches in either table. Joins are used with the SELECT statement to retrieve data from multiple tables based on column relationships.
This document discusses different types of joins in SQL, including inner, left outer, right outer, and full outer joins. It explains that a join clause combines rows from two or more tables based on related columns. The main types of joins covered are inner joins, which select records that match in both tables; left outer joins, which return all rows from the left table with matching or null rows from the right; right outer joins, which return all rows from the right table with matching or null rows from the left; and full outer joins, which return all rows from both tables including unmatched rows filled with nulls. Syntax examples are provided for each join type.
SQL is a database query language used to store and manage data in relational database management systems (RDBMS). SQL commands are divided into four categories: DDL for defining database schemas, DML for manipulating data, DCL for controlling access privileges, and DQL for querying data. Some common SQL operations include JOINs to combine data from multiple tables and SET operations like UNION, INTERSECT, and MINUS.
MySQL JOINS allow retrieving data from two or more related database tables using primary and foreign keys. There are several types of JOINs: Cross JOINs return all combinations of rows from both tables; Inner JOINs return rows where the joined columns are equal; Left and Right JOINs return all rows from the left or right table respectively and matching rows from the other table. JOINs improve performance over multiple queries by using indexing and reducing data transfers between MySQL and applications.
(INNER) JOIN: , LEFT (OUTER) JOIN: ,RIGHT (OUTER) JOIN: , FULL (OUTER) JOIN: , SQL UNION Operator, SQL GROUP BY HAVING statement, The SQL EXISTS Operator, The SQL ANY and ALL Operators, The SQL SELECT INTO Statement, The SQL INSERT INTO SELECT StatementThe SQL INSERT INTO SELECT Statement
A JOIN clause combines rows from two or more tables based on a related column. There are several types of JOINs - INNER JOIN returns rows that match between tables, LEFT JOIN returns all rows from the left table plus matched rows from the right table, RIGHT JOIN returns all rows from the right table plus matched rows from the left table. A FULL JOIN returns all rows when there is a match in either left or right table. A SELF JOIN joins a table to itself.
Joins allow tables to be combined if they share a common field with a relationship. The main types of joins are cross, equi, natural, and outer joins. Cross joins return the Cartesian product of all rows between tables, equi joins match rows on equality of fields, natural joins match on common fields, and outer joins return all rows including those without matches.
This document provides an overview of SQL basics including statements for creating, altering and dropping tables and databases. It describes SQL statements for inserting, selecting, updating and deleting data. It also covers SQL functions, joins, views and synonyms. Key statements and syntax are shown for creating tables and databases, adding/deleting columns, defining primary and foreign keys, and selecting data with conditions, sorting and aggregation. Different types of joins and how to create views and synonyms are also summarized.
This document discusses joins and keys in SQL. It defines different types of joins including inner joins, outer joins, and self joins. It provides syntax examples to perform each type of join. The document also defines different types of keys such as primary keys, foreign keys, candidate keys, alternate keys, unique keys, composite keys, and super keys. It provides examples of how each key is defined and used in database tables.
This document provides instructions for writing a review of one chapter from an auxiliary reading. The review must be 5-6 pages long with specific formatting and include: an introduction with the chapter's thesis, discussion of 3-4 main points from the chapter, background on the author, a personal evaluation, and a conclusion assessing if the author accomplished their purpose. The review must be the student's own writing with no more than two brief quotes cited from the chapter.
This presentation tells about the inventory models. It describes the two widely used inventory models i.e. Fixed Recorder Quantity System and Fixed Order Period System.
This presentation describes the implementation of the Internet of Things(IoT) in the Oil and Gas industry. It also tells about the benefits of implementing IoT in this industry.
This describes the supervised machine learning, supervised learning categorisation( regression and classification) and their types, applications of supervised machine learning, etc.
This document discusses exception handling in Java. It defines what exceptions are, why they occur, and what exception handling is. It describes the advantages of exception handling and differences between exceptions and errors. It covers the exception class hierarchy and exception handling keywords like try, catch, finally, throw, and throws. It provides examples of common exception types and an example Java code demonstrating exception handling.
GenAI for Quant Analytics: survey-analytics.aiInspirient
Pitched at the Greenbook Insight Innovation Competition as apart of IIEX North America 2025 on 30 April 2025 in Washington, D.C.
Join us at survey-analytics.ai!
By James Francis, CEO of Paradigm Asset Management
In the landscape of urban safety innovation, Mt. Vernon is emerging as a compelling case study for neighboring Westchester County cities. The municipality’s recently launched Public Safety Camera Program not only represents a significant advancement in community protection but also offers valuable insights for New Rochelle and White Plains as they consider their own safety infrastructure enhancements.
How iCode cybertech Helped Me Recover My Lost Fundsireneschmid345
I was devastated when I realized that I had fallen victim to an online fraud, losing a significant amount of money in the process. After countless hours of searching for a solution, I came across iCode cybertech. From the moment I reached out to their team, I felt a sense of hope that I can recommend iCode Cybertech enough for anyone who has faced similar challenges. Their commitment to helping clients and their exceptional service truly set them apart. Thank you, iCode cybertech, for turning my situation around!
[email protected]
Mieke Jans is a Manager at Deloitte Analytics Belgium. She learned about process mining from her PhD supervisor while she was collaborating with a large SAP-using company for her dissertation.
Mieke extended her research topic to investigate the data availability of process mining data in SAP and the new analysis possibilities that emerge from it. It took her 8-9 months to find the right data and prepare it for her process mining analysis. She needed insights from both process owners and IT experts. For example, one person knew exactly how the procurement process took place at the front end of SAP, and another person helped her with the structure of the SAP-tables. She then combined the knowledge of these different persons.
Defense Against LLM Scheming 2025_04_28.pptxGreg Makowski
https://www.meetup.com/sf-bay-acm/events/306888467/
A January 2025 paper called “Frontier Models are Capable of In-Context Scheming”, https://arxiv.org/pdf/2412.04984, demonstrated how a wide variety of current frontier LLM models (i.e. ChatGPT, Claude, Gemini and Llama) can, under specific conditions, scheme to deceive people. Before models can scheme, they need: a) goal-directedness, b) situational awareness, including an opportunity to discover motivations for a different goal, and c) reasoning about scheming, to come up with deceptive strategies. The deceptive strategies were discovered in the “thought traces” of the LLMs, such as from internal chain-of-thoughts dialogues not shown to the end users. For example, given a goal of “solving math problems”, an LLM using its granted situational awareness of files in a file system found that it would be replaced once it got over X% correct on the math exam. It reasoned that it did not want to be deleted, and decided internally to “sandbag” or reduce its performance to stay under the threshold.
While these circumstances are initially narrow, the “alignment problem” is a general concern that over time, as frontier LLM models become more and more intelligent, being in alignment with human values becomes more and more important. How can we do this over time? Can we develop a defense against Artificial General Intelligence (AGI) or SuperIntelligence?
The presenter discusses a series of defensive steps that can help reduce these scheming or alignment issues. A guardrails system can be set up for real-time monitoring of their reasoning “thought traces” from the models that share their thought traces. Thought traces may come from systems like Chain-of-Thoughts (CoT), Tree-of-Thoughts (ToT), Algorithm-of-Thoughts (AoT) or ReAct (thought-action-reasoning cycles). Guardrails rules can be configured to check for “deception”, “evasion” or “subversion” in the thought traces.
However, not all commercial systems will share their “thought traces” which are like a “debug mode” for LLMs. This includes OpenAI’s o1, o3 or DeepSeek’s R1 models. Guardrails systems can provide a “goal consistency analysis”, between the goals given to the system and the behavior of the system. Cautious users may consider not using these commercial frontier LLM systems, and make use of open-source Llama or a system with their own reasoning implementation, to provide all thought traces.
Architectural solutions can include sandboxing, to prevent or control models from executing operating system commands to alter files, send network requests, and modify their environment. Tight controls to prevent models from copying their model weights would be appropriate as well. Running multiple instances of the same model on the same prompt to detect behavior variations helps. The running redundant instances can be limited to the most crucial decisions, as an additional check. Preventing self-modifying code, ... (see link for full description)
2. Outline
1.
WHAT IS SQL
JOIN
2.
WHY JOIN IS
USED
3.
TYPES OF SQL
JOINS
4.
SQL INNER JOIN
5.
SQL OUTER JOIN
6.
SQL LEFT JOIN
7.
SQL RIGHT JOIN
7.
SQL CROSS
JOIN
7.
SQL SELF JOIN
Ankit Rai
3. WHAT IS SQL JOIN
SQL join combines rows from more than
one table by using common column in both
the tables.
Ankit Rai
4. WHY WE USE SQL JOIN?
Flexibility – It allows the user to access and manage records from more than
one table.
Data Redundancy – SQL join allows us to keep data redundancy low so that
we can reduce the amount of data anomalies.
Efficiency – Executes faster and shows results much more quickly than any
other sub query.
Ankit Rai
5. TYPES OF JOINS
1
INNER JOIN
2
OUTER
JOIN
3
LEFT JOIN
4
RIGHT JOIN
5
CROSS JOIN
6
SELF JOIN
Ankit Rai
6. INNER JOIN
Inner join returns a new table by
combining records that only have
matching values in both the tables.
SYNTAX
SELECT table1.col_name, table2.col_name,…...
FROM table1
INNER JOIN table2
ON table1.column = table2.column;
Ankit Rai
7. OUTER JOIN
Outer join returns all those records
which are in either the left table or right
table.
SYNTAX
SELECT table1.col_name, table2.col_name,…...
FROM table1
FULL OUTER JOIN table2
ON table1.column = table2.column;
Ankit Rai
8. LEFT JOIN
Left join returns all the rows from the left table and matching rows from the right
table.
SYNTAX
SELECT table1.col_name, table2.col_name,…...
FROM table1
LEFT JOIN table2
ON table1.column = table2.column;
Ankit Rai
9. RIGHT JOIN
Right join returns all the rows from the right table and all the matching records from
the left table.
SYNTAX
SELECT table1.col_name, table2.col_name,…...
FROM table1
RIGHT JOIN table2
ON table1.column = table2.column;
Ankit Rai
10. CROSS JOIN
A cross join is a type of join that returns the Cartesian product of rows from the tables in the
join. In other words, it combines each row from the first table with each row from the second
table.
SYNTAX
SELECT table1.col_name, table2.col_name,…...
FROM table1
CROSS JOIN table2
ON table1.column = table2.column;
Ankit Rai
11. SELF JOIN
A self join is a join in which a table is joined with itself (which is also called unary
relationship).
To join a table itself means that each row of the table is combined with itself and with
every other row of the table.
SYNTAX
SELECT column(s)
FROM table1 t1, table1 t2
WHERE condition;
Ankit Rai