Soql Like On Id Field
In order to find out what records a given id field contains, you can use the SOQL command. SOQL is a query language that supports lists and sets. By comparing the ID fields of two objects, you can determine which records are corresponding to each other. You can then use the SELECT COUNT() command to find the number of records in a given id field.
This operator can only match a field’s id field if it contains the specified substring. Since the LIKE operator is case-insensitive, it puts a lot of load on the server. Hence, you need to use the LIKE operator with care. The LIKE operator is an important SQL query operator. If you use it improperly, you can end up messing up your data.