# Write a SOQL query to retrieve the Record Type ID and DeveloperName for the Account object without using a RecordType SOQL query (compare SOQL on RecordType vs Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName()).

**Topic:** Development · **Difficulty:** Medium · **Asked at:** Accenture, Infosys, Cognizant · **Tags:** soql, scenario, record-type, describe

Read it on the site: https://www.forcechallenges.com/interview-questions/write-a-soql-query-to-retrieve-the-record-type-id-and-developername-for-the-account-object-without-using-a

## Answer

**SOQL on RecordType** costs a query against the governor limit:
```soql
SELECT Id, DeveloperName FROM RecordType WHERE SobjectType = 'Account'
```
**Schema describe** returns record type info without using any SOQL query:
```apex
Id rtId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Customer').getRecordTypeId();
```
Prefer describe calls in triggers and loops because they don't count against the 100 SOQL limit (note: describe only returns record types available to the running user, except the Master type).

---
Source: ForceChallenges · last updated 2026-10-19
