更正一下
tel varchar(15) check(tel like '%[0-9][0-9]'),

解决方案 »

  1.   

    for example:
    SQL> desc t;
     名称                                      空?      类型
     ----------------------------------------- -------- -------------
     FPHM                                               NUMBER
     KSHM                                               VARCHAR2(20)
    SQL> alter table t add constraints cons_t_check_kshm 
      2  check(substr(kshm,-2) between 1 and 99999999999);表已更改。SQL> insert into t values(1,'1awef2');
    insert into t values(1,'1awef2')
    *
    ERROR 位于第 1 行:
    ORA-01722: 无效数字
    SQL> insert into t values(1,'1awef22');已创建 1 行。SQL> insert into t values(1,'1awef21324');已创建 1 行。SQL>