3

I am fetching account name in this query.

public class contactcon{
    List<contact> con = [Select id,name,accountName from contact];
}

1 Answer 1

7

use dot(.) between account.name

List con = [Select id,name,account.Name from contact]

You must log in to answer this question.

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