full outer join syntax
Answers were Sorted based on User's Feedback
Answer / thiyagarajan
select table1.columnname1,table2.columnname2
from
table1 full outer join table2
on
table1.colname=table2.colname
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / madhav
Full outer join
select e.empno,e.ename,e.deptno,e.sal,d.deptno,d.dname from
emp e full outer join dept d
on e.deptno=d.deptno;
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / avi007
full outer join -
select * from table1,table2 where
table1.columnname(+)=table2.colunmname;
union
select * from table1,table2 where
table1.columnname =table2.colunmname(+);
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / naresh
select * from table full outer join tablename2;
or
select * from table1,table2 where
table1.columnname(+)=table2.colunmname(+);
Is This Answer Correct ? | 1 Yes | 4 No |
Answer / ambedkar
At first Full outer join is never not possible.
Is This Answer Correct ? | 0 Yes | 4 No |
Is sql a oracle?
IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTEAD OF PRIMARY KEY WHY CANT WE USE UNIQUE AND NOT NULL.THESE TWO ALSO DOESNT ACCEPT NULL VALUES IN NOT NULL AND UNIQUE DOESNT ACCEPT DUPLICATE VALUES? SO WHAT IS THE DIFEERENCE BETWEEN(UNIQUE,NOT NULL) AND PRIMARY KEY??????
What can I use instead of union in sql?
How to test for null values?
which will fire first ? Trigger or Constraint
24 Answers i2, IBM,
What is the source code of a program?
How to display the current date in sql?
What are the types of subqueries?
What is user define exception and example
how to check the 3rd max salary from an employee table? One of the queries used is as follows: select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal). Here in the sub query "select count(distinct(sal)) from emp b where a.sal<=b.sal" or "select count(distinct(sal)) from emp b where a.sal=b.sal" should reveal the same number of rows is in't it? Can any one here please explain me how is this query working perfectly. However, there is another query to get the 3rd highest of salaries of employees that logic I can understand. Pls find the query below. "select min(salary) from emp where salary in(select distinct top 3 salary from emp order by salary desc)" Please explain me how "select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal)" works source:http://www.allinterview.com/showanswers/33264.html. Thanks in advance Regards, Karthik.
what is the difference between cluster and non cluster index? : Sql dba
write the Sql query for creating database backup?