Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select to compare two tables
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01683376
Message ID:
01683379
Views:
39
>>Hi,
>>
>>Say, I have two tables in the SQL Server DB. The structure of the tables is the same. And most of the records are the same (my assumption). I want to create a SQL Select that would show me just those rows that exist in one table but do not exist in another table.
>>How would you create such a SQL Select?
>>
>>TIA
>
>Is there a single key column value that's common to both tables as an identifier?

All columns are the same in both tables. As I said, the structure of the tables is exactly the same. But if you were to use one column to be the "key" for comparison, yes, such a column exists. Say you call it ID_NUMBER
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform