Table: UserInfoTbl
=======================
| username | type |
=======================
| user0001 | premium |
| user0002 | premium |
| user0003 | normal |
| user
DroidMatt can you clarify what the 2 tables relationship are
UserInfoTbl.username = UserPvTbl.fusername
or
UserInfoTbl.username = UserPvTbl.username
Vikram is right assuming the first. otherwise you want this.
SELECT *
FROM UserInfoTbl, UserPvTbl
WHERE UserPvTbl.username = UserInfoTbl.username
AND UserPvTbl.username = 'user0003'
select U.*
from UserInfoTbl U
inner join UserPvTbl UP
on U.username = UP.fusername
where UP.username = 'user0003'
Use like :
select * from UserInfoTbl inner join UserPvTbl on UserInfoTbl.username=UserPvTbl.fusename
where UserPvTbl.usename='user0003'