tags:

views:

13

answers:

1

there is two table first table is pg_vendor_signup

pg_vendor_signup
id
vendor_id
name
country_id

secound table
is
pg_vendor_friends
vid
fid
status


pg_vendor_signup
contain data
is

1
3
ramu
381

2
4
raj
381
2
4
usha
381
3
4
krian
381
4
4
manu
381

4
9
aswin
381



pg_vendor_friends
countain
1
9
4
0


1
9
3
0

i Want get all name where country id=381 and in pg_vendor_friends get status of table

A: 

Its not very clear what you want.

In case you want the name and status of all with country_id = 381 you can do:

select name,status 
from pg_vendor_signup,pg_vendor_friends
where id = vid and country_id = 381;
codaddict