Is it possible to select only fields using SOQL
? I mean to select fields without selecting whole SObjects
?
For example, is it possible to select a List<Name>
of names of accounts, such that accounts have Rating = 'Warm'
?
I know about
List<Account> = [
SELECT Name
FROM Account
WHERE Rating = 'Warm`
];
But I would like my list to have only names.