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
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