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 / 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 View All Answers
What is "scheduled jobs" or "scheduled tasks"?
As a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this?
what is the main function of a query parameter?
How to connect to SQL Azure Database by using sqlcmd?
Write the queries for commands like Create Table, Delete table, Drop Table etc.
What does this statement do @@rowcount?
Can two different columns be merged into single column? Show practically?
Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?
What happens if time-only values are provided as date and time literals?
Beginning with sql server version 7 0, a new enhanced data type nchar was added what type of data is supported with this data type?
What do we have to check in database testing?
How you trouble shoot when any job fails
How to insert data with null values?
How many types of functions are there in sql server?
What is always encrypted?