anyone know to how to create a query to find out if the data in one column contains (like function) of another column?
For example
ID||First_Name || Last_Name ------------------------ 1 ||Matt || Doe ------------------------ 2 ||Smith || John Doe ------------------------ 3 ||John || John Smith
find all rows where Last_name contains First_name. The answer is ID 3
thanks in advance
Here's one way to do it:
Select *
  from TABLE
 where instr(first_name, last_name) >= 1;
Try this:
select * from TABLE where last_name LIKE '%' + first_name + '%'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With