Can one ask for the content of a field in a like condition? As in the SQL statement:
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
select * from table1 as a, table2 as b where a.field1 like '%b.field2%'
select a.foo , a.bar , a.field1 , b.qux , b.fap , b.field2 from table1 as a inner join table2 as b on a.field1 like '%' || b.field2 || '%'
Please don't use the dreaded, evil "select star." Please always try to write your joins using JOIN syntax, not the older style which lists tables using commas.
Are you surprised to see something other than an equals sign in the ON clause? Joins condition can actually be written with all kinds of comparison operators.
Dig Deeper on Oracle and SQL
Related Q&A from Rudy Limeback
Read an example of an SQL case expression from our SQL expert Rudy Limeback.continue reading
Read about the Mimer Validator, a tool used to verify your SQL code, in this tip from SQL expert Rudy Limeback.continue reading
Read SQL expert Rudy Limeback's advice for counting combinations in a table with SQL's GROUP BY clausecontinue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.