SELECT client_code FROM `logpm_basicdata_client` WHERE is_deleted = 0 AND client_code LIKE 'HT00%' AND LENGTH(client_code) = 9 AND is_deleted = 0 ORDER BY client_code DESC
SELECT client_code FROM `logpm_basicdata_client` WHERE is_deleted = 0 AND client_code LIKE CONCAT(#{tenantCode},'%') AND LENGTH(client_code) = 9 AND is_deleted = 0 ORDER BY client_code DESC