Oracle: SQL query that returns rows with only numeric values

前端 未结 6 511
抹茶落季
抹茶落季 2020-12-12 17:21

I have a field (column in Oracle) called X that has values like \"a1b2c3\", \"abc\", \"1ab\", \"123\", \"156\"

how do I write an sql query that returns me only the X

6条回答
  •  庸人自扰
    2020-12-12 17:53

    If the only characters to consider are letters then you can do:

    select X from myTable where upper(X) = lower(X)
    

    But of course that won't filter out other characters, just letters.

提交回复
热议问题