I feel like an idiot asking this...
Table 1: users id serial person integer username char(32) Table 2:persons id serial name char(16)
Can I run a query that returns the name field in persons by providing the username in users?
users 1 | 1 | larry123 persons 1 | larry 2 | curly
SQL?
select name from persons where users.person=persons.id and users.username='larry123';
with the desired return of
larry
I have been doing it with two passes until now and think maybe a nested select using a join is what I need
1 | larry