Explain UNION,MINUS,UNION ALL, INTERSECT ?

1 Answer

Answer :

INTERSECT returns all distinct rows selected by both queries.MINUS -
returns all distinct rows selected by the first query but not by the
second.UNION - returns all distinct rows selected by either queryUNION
ALL - returns all rows selected by either query, including all duplicates.

Related questions

Description : Select NORTH', CUSTOMER From CUST_DTLS Where REGION = N' Order By CUSTOMER Union Select EAST', CUSTOMER From CUST_DTLS Where REGION = E' Order By CUSTOMER The above is a) Not an error b) Error - ... ' and SOUTH' c) Error - the string should be in double quotes d) Error - ORDER BY clause

Last Answer : d) Error - ORDER BY clause

Description : What are the return values of functions SQLCODE and SQLERRM ? What is Pragma EXECPTION_INIT ? Explain the usage ?

Last Answer : SQLCODE returns the latest code of the error that has occurred. SQLERRM returns the relevant error message of the SQLCODE.

Description : Explain what partitioning is and what its benefit is.

Last Answer : Partitioning is a method of taking large tables and indexes and splitting them into smaller, more manageable pieces.

Description : Explain materialized views and how they are used.

Last Answer : Materialized views are objects that are reduced sets of information that have been summarized, grouped, or aggregated from base tables. They are typically used in data warehouse or decision support systems.

Description : Explain the use of table functions.

Last Answer : Table functions are designed to return a set of rows through PL/SQL logic but are intended to be used as a normal table or view in a SQL statement. They are also used to pipeline information in an ETL process.

Description : Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.

Last Answer : A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any ... functions and procedures that are grouped together based on their commonality to a business function or application.

Description : Explain the use of setting GLOBAL_NAMES equal to TRUE.

Last Answer : Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database to which they are linking.

Description : Explain the difference between $ORACLE_HOME and $ORACLE_BASE.

Last Answer : ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.

Description : Explain an ORA-01555

Last Answer : You get this error when you get a snapshot too old within rollback. It can usually be solved by increasing the undo retention or increasing the size of rollbacks. You should also look at the logic involved in the application getting the error message.

Description : How would you go about generating an EXPLAIN plan?

Last Answer : Create a plan table with utlxplan.sql. Use the explain plan set statement_id = 'tst1' into plan_table for a SQL statement Look at the explain plan with utlxplp.sql or utlxpls.sql

Description : Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.

Last Answer : ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all transactions that have occurred in the database so that you can recover to any point in time. ... having to write transactions to an archive log and thus increases the performance of the database slightly.

Description : Explain the difference between a data block, an extent and a segment.

Last Answer : A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings ... that an object takes when grouped together are considered the segment of the database object.

Description : Explain the difference between a hot backup and a cold backup and the benefits associated with each.

Last Answer : A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is ... and thus there will be a slight performance gain as the database is not cutting archive logs to disk.

Description : What is a join ? Explain the different types of joins ?

Last Answer : Join is a query which retrieves related columns or rows from multiple tables.Self Join - Joining the table with itself.Equi Join - Joining two tables by equating two common columns.Non-Equi Join - ... that query can also retrieve rows that do not have corresponding join value in the other table.

Description : Explain Connect by Prior ?in a session before accessing next value ?

Last Answer : Retrieves rows in hierarchical order.e.g. select empno, ename from emp where.

Description : Explain how procedures and functions are called in a PL/SQL block ?

Last Answer : Function is called as part of an expression. sal := calculate_sal ('a822'); procedure is called as a PL/SQL statement calculate_bonus ('A822');

Description : What is a package ? What are the advantages of packages ? What is Pragma EXECPTION_INIT ? Explain the usage ?

Last Answer : The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get an error message of a specific oracle error. e.g. PRAGMA EXCEPTION_INIT (exception name, oracle error number)

Description : Explain the two type of Cursors ?

Last Answer : There are two types of cursors, Implicit Cursor and Explicit Cursor. PL/SQL uses Implicit Cursors for queries. User defined cursors are called Explicit Cursors. They can be declared and used.

Description : Explain the usage of WHERE CURRENT OF clause in cursors ?

Last Answer : WHERE CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor. Database Triggers

Description : Explain the following file extension related to library?

Last Answer : .pll,.lib,.pld The library pll files is a portable design file comparable to an fmb form file The library lib file is a plat form specific, generated library file comparable to a fmx form file The pld file is Txt format file and can be used for source controlling your library files Parameter

Description : Explain types of Block in forms4.0?

Last Answer : Base table Blocks. Control Blocks. 1. A base table block is one that is associated with a specific database table or view. 2. A control block is a block that is not associated with a database table. ITEMS

Description : Explain about stacked canvas views?

Last Answer : Stacked canvas view is displayed in a window on top of, or "stacked" on the content canvas view assigned to that same window. Stacked canvas views obscure some part of the underlying content canvas view, and or often shown and hidden programmatically.

Description : Explain about horizontal, Vertical tool bar canvas views?

Last Answer : Tool bar canvas views are used to create tool bars for individual windows. Horizontal tool bars are display at the top of a window, just under its menu bar. Vertical Tool bars are displayed along the left side of a window

Description : What is a Database instance ? Explain

Last Answer : A database instance (Server) is a set of memory structure and background processes that access a set of database files. The process can be shared by all users. The memory structure that are ... helps up to improve database performance by decreasing the amount of I/O performed against data file.

Description : What is a deadlock ? Explain .

Last Answer : Two processes wating to update the rows of a table which are locked by the other process then deadlock arises. In a database environment this will often happen because of not issuing ... when a commit/rollback operation performed or any one of this processes being killed externally.

Description : Explain the relationship among Database, Tablespace and Data file.?

Last Answer : Each databases logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace

Description : Explain the relationship among database, tablespace and data file.

Last Answer : Each databases logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace.

Description : Does PL/SQL support “overloading”? Explain

Last Answer : The concept of overloading in PL/SQL relates to the idea that you can define procedures and functions with the same name. PL/SQL does not look only at the referenced name, however, ... Prefacing a procedure or function name with the package name fully qualifies any procedure or function reference.

Description : Explain Oracle memory structure

Last Answer : The Oracle RDBMS creates and uses storage on the computer hard disk and in random access memory (RAM). The portion in the computer s RAM is called memory structure. Oracle has two memory structures ... the user has retrieved from the database or data that the user wants to place into the database.

Description : Explain the differences between SHUTDOWN, SHUTDOWN NORMAL, SHUTDOWN IMMEDIATE AND SHUTDOWN ABORT.

Last Answer : SHUTOWN NORMAL = SHUTDOWN : It waits for all sessions to end, without allowing new connections. SHUTDOWN IMMEDIATE : Rollback current transactions and terminates every session. SHUTDOWN ABORT : Aborts all ... in an inconsistent state. It's the fastest method, but can lead to database corruption.

Description : Explain the differences between PFILE and SPFILE

Last Answer : A PFILE is a Static, text file that initializes the database parameter in the moment that it's started. If you want to modify parameters in PFILE, you have to restart the database. ... binary file that allows you to overwrite parameters while the database is already started (with some exceptions)

Description : What's the least number of straight lines across America do you need to intersect every state?

Last Answer : You need just one. Just place some black holes at the appropriate positions. They will warp spacetime, so from an outside reference frame, the line will have curves, but from the reference frame of ... around it will intersect every state, and depending on the angle, even every point on the map.

Description : Brain Teaser - How can you determine if date intervals intersect?

Last Answer : * Head asplodes * (That would be no.)

Description : In trapezium ABCD, AB|| DC and diagonals AC and BD intersect at O. If area of triangle AOD is 30cm square , find the area of triangle BOC -Maths 9th

Last Answer : In the given figure: Area of triangle ADC = Area of triangle BCD (Triangles on the same and parallel) Now subtract the area of triangle DOC from both of them so... (Area of triangle ADC - Area of ... => Area of triangle AOD = Area of triangle BOC Hence the area of triangle BOC is 30 cm square.

Description : a squar ABCD in which AC =BE when BC produced .A is joined to E prove that FG=GE when AE intersect BD at F and CD at G -Maths 9th

Last Answer : Please give the figure to get your answer, as it is necessary to have figure to answer the question related to geometry.

Description : Why parallel line can not intersect -Maths 9th

Last Answer : Its a simple question which have a simple answer.. The answer is that :- When you draw a straight line on a paper you will find that the line is straight and when you measure it by you protector or ... so that means 90°+90°=180° which means it will never interest each other at any condition...

Description : In the given figure, if chords AB and CD of the circle intersect each other at right angles, then find x + y. -Maths 9th

Last Answer : ∴ ∠CAO = ∠ODB = x [angles in same segment ] ---- (i) Now, in right angled ΔDOB , ∠ODB + ∠DOB + ∠OBD = 180° ⇒ x + 90° + y =180° (using equation i) ⇒ x + y = 90°

Description : Two circles intersect at A and B. AC and AD are respectively the diameters of the circles. Prove that C, B and D are collinear. -Maths 9th

Last Answer : Join CB, BD and AB, Since, AC is a diameter of the circle with centre O. ∴ ∠ABC = 90° [angle in semi circle] ---- (i) Also, AD is a diameter of the circle with center O . ∴ ∠ABD = 90° [angle in ... ⇒ ∠ABC + ∠ABD = 180° So. CBD is a straight line. Hence C, B and D are collinear . Hence proved.

Description : The diagonals AC and BD of parallelogram ABCD intersect at the point O. -Maths 9th

Last Answer : ABCD is a parallelogram . ∴ AD | | BC ⇒ ∠ACB = ∠DAC = 34° Now, ∠AOB is an exterior angle of △BOC ∴ ∠OBC + OCB = ∠AOB [∵ ext ∠ = sum of two int. opp. ∠S] ⇒ ∠OBC + 34° = 75° ⇒ ∠OBC = 75° - 34° = 41° or ∠DBC = 41°

Description : In a parallelogram, show that the angle bisectors of two adjacent angles intersect at right angles. -Maths 9th

Last Answer : Given : A parallelogram ABCD such that the bisectors of adjacent angles A and B intersect at P. To prove : ∠APB = 90° Proof : Since ABCD is a | | gm ∴ AD | | BC ⇒ ∠A + ∠B = 180° [sum of consecutive interior ... 90° + ∠APB + ∠2 = 180° [ ∵ ∠1 + ∠2 = 90° from (i)] Hence, ∠APB = 90°

Description : ABCD is a parallelogram whose diagonals intersect at O. If P is any point on BO, prove that : -Maths 9th

Last Answer : (i) Since diagonals of a parallelogram bisect each other. ∴ O is the mid - point AC as well as BD. In △ADC, OD is a median. ∴ ar(△ADO) = ar(△CDO) [∵ A median of a triangle divide it into two triangles of equal ... and (i) , we have ar(△AOB) - ar(△AOP) = ar(△BOC) - ar(△COP) ⇒ ar(△ABP) = (△CBP)

Description : Diagonals AC and BD of a quadrilateral ABCD intersect each other at P. -Maths 9th

Last Answer : Draw AM ⟂ BD and CL ⟂ BD. Now, ar(△APB) × ar(△CPD) = {1/2 PB × AM} × {1/2 DP × CL} = {1/2 PB × CL} × {1/2 DP × AM} ar(△BPC) × ar(△APD) Hence, ar(△APB) × ar(△CPD) = ar(△APD) × ar(△BPC)

Description : If two lines intersect prove that the vertically opposite angles are equal. -Maths 9th

Last Answer : Given Two lines AB and CD intersect at point O.

Description : Prove that two lines that are respectively perpendicular to two intersecting lines intersect each other. -Maths 9th

Last Answer : Given Let lines l and m are two intersecting lines. Again, let n and p be another two lines which are perpendicular to the intersecting lines meet at point D. To prove Two lines n and p ... is a contradiction. Thus, our assumption is wrong. Therefore, lines n and p intersect at a point.

Description : Bisectors of the angles B and C of an isosceles triangle with AB = AC intersect each other at O. -Maths 9th

Last Answer : Solution of this question

Description : The diagonals AC and BD of a parallelogram ABCD intersect each other at the point 0. -Maths 9th

Last Answer : According to question parallelogram ABCD intersect each other at the point 0. If ∠DAC = 32° and ∠AOB = 70°.

Description : Diagonals AC and BD of a parallelogram ABCD intersect each other at O. -Maths 9th

Last Answer : According to parallelogram ABCD intersect each other at O. If OA = 3 cm and OD = 2 cm, determine the lengths of AC and BD.

Description : The diagonals of a parallelogram ABCD intersect at a point O. -Maths 9th

Last Answer : According to question PQ divides the parallelogram into two parts of equal area.

Description : The median BE and CF of a triangle ABC intersect at G. -Maths 9th

Last Answer : According to question the area of ΔGBC = area of the quadrilateral AFGE.

Description : If a line is drawn parallel to the base of an isosceles triangle to intersect its equal sides, prove that the quadrilateral, so formed is cyclic. -Maths 9th

Last Answer : Given ΔABC is an isosceles triangle such that AB = AC and also DE || SC. To prove Quadrilateral BCDE is a cyclic quadrilateral. Construction Draw a circle passes through the points B, C, D and E.