1

I have these queries,

select ownerId from account
select firstname from user

How can I join them? OR How can I get the owner name from account table? Thanks in advance.

1
  • 2
    select owner.name from Account where ... Feb 8, 2016 at 21:29

1 Answer 1

2

SELECT Owner.Name FROM Account WHERE ... Any time you've got a standard field which is a lookup, you can just remove 'Id' from the end and add '.Name' (or whatever other field you want). If you're dealing with a custom field (ending in __c), you can do the same with '__r.Name'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .