DELETE FROM CMN_GRID_COLS WHERE grid_id = ????;
How about doing none of this and just having a corrupt filter, configuration or view not fail the whole the UI in a non recoverable fashion? Please vote up the More Graceful Fail on Pages with Failed Portlet Filters if you believe this would add value to your organization.