Reply to Re: Selecting rows from one table that are not in the other

Your name:

Reply:


Posted by MC on 10/02/06 11:45

There are more then one way to do this. Heres one:

select <column list>
from
TableA
left join TableB on tableA.col1 = tableB.col1
where
tableB.col1 is null

You could also use NOT EXISTS and so on..


MC



"Zvonko" <zvonko_NOSPAM_@velkat.net> wrote in message
news:e27gh5$dar$1@ss408.t-com.hr...
> hi!
>
> I have two tables with same structure. I need to run a select query
> that will return only the rows
> from one table that are not in the other.
>
> In MySQL it would be
> select * from table1 MINUS select * from table2.
> but in MsSql I can not find the apropriate way to do this.
> Any Help?
>
>
> Zvonko
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация