📅  最后修改于: 2022-03-11 15:05:30.047000             🧑  作者: Mango
// This is the object for which we required data.
Map fieldMap = Opportunity.sObjectType.getDescribe().fields.getMap();
// Get all of the fields on the object
Set fieldNames = fieldMap.keySet();
// Build a Dynamic Query String.
List opps = Database.query('select ' + string.join(fieldNames, ',') + ' from Opportunity');