How to get recordtype name and ID with SOQL query

In salesforce you are writing an apex class or trigger and you want that your logic to be work only for particular record type then you put IF condition in your code and in that IF condition you will check that this logic should works only for the particular recordtype, right ? We can achieve that in multiple ways, we can fire a SOQL query and can fetch the recordtype name but SOQL query will countContinue Reading