locked
Need Help in Oracle Query!! RRS feed

  • Question

  • User-715854009 posted

    Hi,

    I need help in an oracle query .

    I have a table lets say table1 with a column name data. and another table lets say table2 have same column name. both columns stores same type of data. both tables has an id column which can allow me to inner join table1 and table2. 

    Now I'm trying to write a query to get count of rows with condition table.data <> table2.data.

    how can I achive this?

    Thursday, March 22, 2012 5:28 PM

Answers

  • User-2076991548 posted

    select * from table1 inner join table2 ON table1.id = table2.id

    where table1.data <> table2.data

    to get the results

    select count(1) from table1 inner join table2 ON table1.id = table2.id

    where table1.data <> table2.data

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 22, 2012 6:45 PM