WITH T AS(
SELECT 6225 AS ID,'工商银行' AS NAME FROM DUAL UNION ALL
SELECT 62251 AS ID,'农业银行' AS NAME FROM DUAL UNION ALL
SELECT 622512 AS ID,'建设银行' AS NAME FROM DUAL UNION ALL
SELECT 6225123 AS ID,'民生银行' AS NAME FROM DUAL UNION ALL
SELECT 62251234 AS ID,'邮政银行' AS NAME FROM DUAL UNION ALL
SELECT 622512345 AS ID,'瑞士银行' AS NAME FROM DUAL
)
SELECT ID,NAME FROM T WHERE T.ID IN(
SELECT MAX(ID) FROM T WHERE '62251234567890' LIKE ID ------解决方案-------------------- '%'
);