Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.

Answers were Sorted based on User's Feedback



hi, how to match retrieve the unmatched records from 2 tables in which we dont have any primary..

Answer / gangadhar

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

Is This Answer Correct ?    18 Yes 0 No

hi, how to match retrieve the unmatched records from 2 tables in which we dont have any primary..

Answer / debi

(select * from table2)
minus
(select * from table1)

Is This Answer Correct ?    6 Yes 6 No

hi, how to match retrieve the unmatched records from 2 tables in which we dont have any primary..

Answer / newbie

SELECT * from Table2
EXCEPT
SELECT * FROM Table1

Is This Answer Correct ?    1 Yes 1 No

hi, how to match retrieve the unmatched records from 2 tables in which we dont have any primary..

Answer / madhu sudhan g

Hiii

Its very simple to get the records that doesn't match lets
table1 is No1 and having A column values 1,2,3,4,5 and Table2
is No2 having column B values 1,2,3,4,5,6,7,8,9,10
Now Query is

select B from NO2 where B NOT IN(select A from NO1)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

How do I connect to sql server database?

0 Answers  


Explain syntax for dropping triggers?

0 Answers  


What is read uncmmited?

0 Answers  


What is the stuff?

0 Answers  


Please give me queries for the following 1. To get the count of duplicate records. 2. A query to delete the duplicate records.

3 Answers   247Customer,


What are the advantages of log shipping?

0 Answers  


What are statistics, under what circumstances they go out of date, how do you update them?

2 Answers   HCL,


How many types of indexes are there in SQL Server?

6 Answers   CarrizalSoft Technologies, United Healthcare,


why would you use sql agent? : Sql server database administration

0 Answers  


hi, may i know what is the command to get abstract the current month, current year and current day from a given date.i want these three in a isolated way..seperatedly is that any way in sql server 2000

3 Answers  


How do we rollback the table data in SQL Server

3 Answers  


Explain error and transaction handling in sql server?

0 Answers  


Categories