sql - Select from Table A Rows that Contain Value from Column from Table B -


i want select table a rows have values table b column 1.

example:

table a: name | age name1 19 name2 50 name3 50 name4 51  table b: name | anothercolumn name1 | ... name2 | ... 

the result should be:

name1 name2 

so far succeed make query when try reffer on value table b in column asks me promnt value.

select a.name tablea exists (select 1               tableb               a.name = tableb.name) 

or

select a.name  tablea  inner join tableb b on a.name = b.name 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -