forum

Home / DeveloperSection / Forums / compare two fields of a single table in oracle sql

compare two fields of a single table in oracle sql

Mark Devid202309-May-2013
Hi All!

I'm having a table like below, I need to write a sql query to compare and validate the records are in proper order. ex: US is having no1 in column2 like that each 

country have their own no's , I need to write a code to validate that no country has the same no's assigned for more than one country and need to check weather the country has his assigned no only.

My table structure as per following

|column1|column2|
--------------------------------
|US  |no1    |
|Japan|no2    |
|dravid |no3|

Please help me as soon as possible.


Updated on 09-May-2013

Can you answer this question?


Answer

1 Answers

Liked By