回覆列表
  • 1 # 藍風24

    1、建立測試表,

    create table test_isnum(id number, value varchar2(20));

    2、插入測試資料,

    insert into test_isnum values(1,"a");

    insert into test_isnum values(2,329);

    insert into test_isnum values(4,"15");

    insert into test_isnum values(6,"2c");

    commit;

    3、查詢表中所有記錄,select t.*, rowid from test_isnum t,

    4、編寫sql,判斷value欄位,記錄為數字的內容,

    select t.*,

    case

    when not regexp_like(value, "\D") then

    "是"

    else

    "否"

    end as "是否數字"

    from test_isnum t;

  • 中秋節和大豐收的關聯?
  • 為什麼我家電腦玩穿越火線老是重新啟動?