sql like - Postgresql pattern match a selection -


i'm trying find selection start of column matches column in table in postgres. i'm looking along lines of following.

return records in table1 table1.name starts of labels in table2.labels.

select      name  table1      name (select distinct label table2); 

you should append % sign label use in like. also, use any() subquery may yield more 1 row.

select name  table1 name any(select distinct concat(label, '%') table2); 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -