(2)If an accused person pleads guilty, that plea shall be recorded as the finding of the court but before it is recorded, the court shall ascertain that the accused understands the nature of the charge to which he has pleaded guilty and shall inform him of the general effect of that plea, and in particular of the meaning of the charge to which he has pleaded guilty, and of the difference in procedure which will be made by the plea of guilty and shall advise him to withdraw that plea if it appears from the summary or abstract of evidence or otherwise that the accused ought to plead not guilty.