Blogroll

Get a website with Godaddy


Logo designer Fiverr Frelancer

Tuesday, December 4, 2018

SQL - How to use join

Hi, In Mssql, you may use view to link those wanted tables in view.
Instead of using view,   you may write in SQL


' ------------  inner join-------------------
select  * from tblSalesman s, tbldept d
where s.deptcode  =  d.code
'  in which both table's specified column are matched and display those matched records from both table



'-------------- left outer join -------------------------
select  * from tblSalesman s, tbldept d
where s.deptcode  *= d.code
'  in which both table's specified column are matched and display those matched records from both table plus non-matched records from the left table



'------------ right outer join --------------------------
select  * from tblSalesman s, tbldept d
where s.deptcode  =* d.code

' in which both table's specified column are matched and display those matched records from both table plus non-matched records from the right table


Hope it helps...



TQ





No comments:

Post a Comment

Amazon store

alidropship plugin

alidropship plugin
alidropship plugin

Total Pageviews

About