Click here to Skip to main content
15,890,579 members
Home / Discussions / Database
   

Database

 
AnswerRe: Error on SP I made Pin
Paddy Boyd1-Mar-07 0:44
Paddy Boyd1-Mar-07 0:44 
GeneralRe: Error on SP I made Pin
firestoper1-Mar-07 0:56
firestoper1-Mar-07 0:56 
QuestionIntersect in SQL Server2000 Pin
Prashant C28-Feb-07 23:34
Prashant C28-Feb-07 23:34 
AnswerRe: Intersect in SQL Server2000 Pin
Krish - KP28-Feb-07 23:52
Krish - KP28-Feb-07 23:52 
AnswerRe: Intersect in SQL Server2000 Pin
gauthee1-Mar-07 0:06
gauthee1-Mar-07 0:06 
QuestionRe: Intersect in SQL Server2000 Pin
Prashant C1-Mar-07 0:39
Prashant C1-Mar-07 0:39 
AnswerRe: Intersect in SQL Server2000 Pin
Harini N K1-Mar-07 0:45
Harini N K1-Mar-07 0:45 
AnswerRe: Intersect in SQL Server2000 Pin
Harini N K1-Mar-07 0:54
Harini N K1-Mar-07 0:54 
Hi Parasu,

Your solution is here:

<br />
SELECT TABLEA.* FROM TABLEA<br />
WHERE EXISTS<br />
           (SELECT * FROM TABLEB   WHERE TABLEA.ID = TABLEB.ID)<br />
UNION <br />
SELECT TABLEB.* FROM TABLEB<br />
WHERE EXISTS <br />
   (SELECT * FROM TABLEA WHERE TABLEA.ID = TABLEB.ID)<br />


Please note the difference here:

UNION

This removes duplicate results

UNION ALL

Incorporates all rows into the results, including duplicates. If not specified, duplicate rows are removed.

Hope this solves your problem


Rate this message. Thank you. Harini Smile | :)

GeneralRe: Intersect in SQL Server2000 Pin
Prashant C1-Mar-07 1:11
Prashant C1-Mar-07 1:11 
AnswerRe: Intersect in SQL Server2000 Pin
Priya_20071-Mar-07 20:29
Priya_20071-Mar-07 20:29 
QuestionHow to run script file through .net? Pin
NanaAM28-Feb-07 21:33
NanaAM28-Feb-07 21:33 
AnswerRe: How to run script file through .net? Pin
Colin Angus Mackay28-Feb-07 23:35
Colin Angus Mackay28-Feb-07 23:35 
GeneralRe: How to run script file through .net? Pin
NanaAM1-Mar-07 19:24
NanaAM1-Mar-07 19:24 
GeneralRe: How to run script file through .net? Pin
Colin Angus Mackay1-Mar-07 21:24
Colin Angus Mackay1-Mar-07 21:24 
Questionhow to get top theree salary getters from table Pin
mohd imran abdul aziz28-Feb-07 19:51
mohd imran abdul aziz28-Feb-07 19:51 
AnswerRe: how to get top theree salary getters from table Pin
sam#28-Feb-07 20:09
sam#28-Feb-07 20:09 
AnswerRe: how to get top theree salary getters from table Pin
Sylvester george2-Mar-07 0:01
Sylvester george2-Mar-07 0:01 
QuestionHow to get script of a table? Pin
NanaAM28-Feb-07 19:08
NanaAM28-Feb-07 19:08 
AnswerRe: How to get script of a table? Pin
sam#28-Feb-07 20:11
sam#28-Feb-07 20:11 
GeneralRe: How to get script of a table? Pin
NanaAM1-Mar-07 19:26
NanaAM1-Mar-07 19:26 
QuestionBasic Questions on SQL Stored Procedure Pin
Rahithi28-Feb-07 16:16
Rahithi28-Feb-07 16:16 
AnswerRe: Basic Questions on SQL Stored Procedure Pin
gauthee1-Mar-07 0:10
gauthee1-Mar-07 0:10 
Questionrelationship creation through alter table query Pin
Saira Tanwir28-Feb-07 8:56
Saira Tanwir28-Feb-07 8:56 
AnswerRe: relationship creation through alter table query Pin
Mark J. Miller28-Feb-07 10:34
Mark J. Miller28-Feb-07 10:34 
GeneralRe: relationship creation through alter table query Pin
Mark J. Miller28-Feb-07 10:36
Mark J. Miller28-Feb-07 10:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.