Jump to content

Restrictions on Joins


ameliabob

Recommended Posts

I am not sure whether I am formatting this correctly or there is an undocumented restriction.

 

What I am trying to do is to do a search in subfiles to find anything with "Tab" in the contents field and then do an inner join to the filenames table to get its contents.

SELECT subfiles.contents, subfiles.masterId, filenames.rowId, filenames.contents FROM subfiles  where subfiles.contents like'%Tab%' inner join filenames on filenames.rowId=subfiles.masterId
Link to comment
Share on other sites

I'm really rusty on this stuff. How does that differ from...

SELECT s.contents, s.masterId, f.rowId, f.contents FROM subfiles s, filenames fWHERE f.rowId=s.masterIdAND s.contents LIKE '%Tab%' 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...