Difference between join and a subquery?

Answer Posted / neo devan

A query inside a query or next level query is called
subquery, a subquery can return 1 or more values to the
main query.
Ex: select * from emptable where deptno=(select deptno from
saltable where rownum=1);

A Join is used to query two tables, or views.
Ex: select * from emptable inner join saltable on
emptable.deptno=saltable.deptno;

Is This Answer Correct ?    18 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between pre-select and pre-query?

619


State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.

603


How to define a data source name (dsn) in odbc manager?

525


Explain temporal data types in oracle

603


What is ceil and floor in oracle?

569






Explain what are the different type of segments?

574


What is parameterized cursor in oracle?

574


Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?

1858


What is primefaces used for?

557


Explain the use of rows option in imp command.

604


Can we store images in oracle database?

545


What are the different types of synonyms?

592


How do I use os authentication with weblogic jdriver for oracle and connection pools?

571


How translate command is different from replace?

542


1) What is ONE_SIZE_FITS_ALL approach? 2) Explain the Common & Variable Header of DATA FILE? 3) What are the Drawbacks to using OMF DB? and the Advantages? 4) List out the Advantages of Undo T.spaces over the Undo SEGMENT? 5) Difference between the Temporary tablespace with TEMPFILE and the Tablespace with TEMPORARY Keyword? 6) What are the situation extents are freeing for reuse.

1603