I always enjoy writing and reading articles about JOIN Clauses. One of my friend and the best ColdFusion Expert Ben Nadel has written good article about SQL JOINs. There are few interesting comments as well at the end of article.
“JOIN grouping is pretty powerful and can get you out of those sticky situations that involve mixed table relationship rules. ” Ben Nadel – Grouping JOIN Clauses In SQL
Reference : Pinal Dave (https://blog.sqlauthority.com)
10 Comments. Leave new
Hi
i would like to have any tutorials related to SQL Server 2005, can u help in that?
Hi,
what is the difference between inner join and outer join?
what is the difference between left inner join and right inner join?
what is the difference between left outer join and right outer join?
Please explain it.
Regards,
Mani…
Hi mani
Different between inner join and outer join?
inner join return only match value from both table but in outer join the all value from one table will be return whther they r match or not …
2)what is the difference between left inner join and right inner join?
i think there is a no concept of left inner join or right inner join
3)what is the difference between left outer join and right outer join?
left outer join return all the value from first table , and right join return all the value from second table
Thanx
hi,
how i do index in sql 2005 plz exp plz
Three Types OUTER Joins are available
1. Left Outer
2. Righ Outer
3. Full Outer
I am going to give small example to explain this
Table 1 Name – tblStudent
Columns
ID – Primary Key
Name – Not Allow Null
CityId – Foreign Key Refered ID Column in the City Table
Allows Null
Data
Id Name CityId
1 Russel 1
2 Mike NULL
Table 2 Name – tblCity
Columns
ID – Primary Key
Name – Not Allow Null
Data
Id Name
1 Portland
2 Seattle
LEFT OUTER QUERY RESULT
————————
Id Name CityId Id Name
1 Russel 1 1 Portland
2 Mike NULL NULL NULL
RIGHT OUTER QUERY RESULT
————————-
Id Name CityId Id Name
1 Russel 1 1 Portland
NULL NULL NULL 2 Seattle
FULL OUTER QuERY RESULT
————————-
Id Name CityId Id Name
1 Russel 1 1 Portland
2 Mike NULL NULL NULL
NULL NULL NULL 2 Seattle
Hope it explained you clearly
INNER JOIN QUERY RESULT
————————————
Id Name CityId Id Name
1 Russel 1 1 Portland
I need to join field xyz in 2 tables. In Table 1, xyz is char 16 and in Table 2 xyz is char 17. I can not change the field size in either table. There is one more leading space in Table 2 which cause no data to join together. Any suggestions on how to join them?
@Cy
Can you please more details please,
1. Are you trying to join two columns, meaning concatinating for ex :
tabA : cola = example
tabB : colb = example1
concatination :cola+colb = exampleexample1
Are you trying for this ? This should be no problem !
2. Are you trying to join two tables, using join operator.
select * from tableA , join tableB on cola.tableA= colb.tableB
Are you trying to do this ? Give me a sample column values from both the tables and I will try to write script.
Thanks,
Imran.
Example 2 was my issue and I figured out I can do select * from tableA, tableB on xyz = (‘ ‘ + xyz)
thx for ur information