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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -