hi,

how to match retrieve the unmatched records from 2 tables
in which we dont have any primary key. example : table1 has
1,2,3,4,5 and table2 has 1,2,3,4,5,6,7,8,9,10 and i want
the numbers from 6 to 10 to be displayed and should not
come as null. i need the numbers. please reply as soon as
possible.

Answer Posted / gangadhar

select * from table2 where id not in ( select id from
table1)

Is This Answer Correct ?    18 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the synonym of join?

705


What is sql service broker?

746


What is single-user mode?

706


How global temporary tables are represented and its scope?

728


Why use triggers?

788


Explain log shipping and mention its advantages.

793


What are the different types of sub-queries?

779


Define cursor locking

749


What does it mean to normalize a database and why would you do it?

738


List out some of the requirements to set up a sql server failover cluster?

765


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

701


whats the maximum size of view state??

1915


How to provide default values to stored procedure parameters?

757


What is standby servers? Explain types of standby servers.

684


what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?

1758