sql - Whats the right syntax for the string comparison query involving variable name in PostgreSQL? -


suppose have table name

first name      last name -------------------------- kris             kristos 

i want right syntax query appears

select *  name  first_name '%'last_name'%' 

you use strpos:

select * name strpos(lastname, firstname) > 0; 

sqlfiddledemo


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

formula - R: how to pass in a reference to the variable in glm or lm? -