I would like to create a variable called acc and to select a full account that is inside my accounts:

Something like :

Account acc = [select account from account where name='p2'];

That would save the full account where the name is equal to p2 inside the variable acc


Normally in SQL you can do select * to select all fields. But in SOQL, you cannot do that. You should specify all fields.

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.