Ok… I need to do this simple task… I can do it with java or python in a simple way…
But is there any way to do this using sql and delagating the job to the database engine and not to jvm or python?
I have table 1 and table 2
for example
table 1 has 2 stored titles…
“love is a feeling”, “harry potter”
table 2 has 3 stored titles…
“abc”, “physics 1”, “the trip”
Some are different, but some might be coincidential…
I need to compare each entry of table 2 with all the rows returned from a select title from table1…
so it would be like this
it compares “love is a feeling” with “abc” and “physics 1” and “the trip”, if findes a match it increases the count…
it should do that with all the names and in the end I want to know how many coincidences I have…
as I say it can be done with java or any lang by querying:
results = rows returned by using "select title from table1";
while results.next () {
results2 = rows returned by using "select title from table2";
while results2.next(){
if current results == current results2
count++;
}
}
print count
But thats not what I need…
Learn about SQL joins.