IS it possible to use the 'Where' clause in SQL to only show a field containing only letters & Numbers?

前端 未结 5 753
攒了一身酷
攒了一身酷 2021-01-14 07:56

I want to be able to select only the field where a certain field contains both letters and numbers. for example:

Select [field1], [field2] 

from [db1].[tabl         


        
5条回答
  •  無奈伤痛
    2021-01-14 08:17

    Select [field1], [field2] 
    
    from [db1].[table1] 
    
    where [field2] REGEXP '^[0-9a-fA-F]*$'
    

提交回复
热议问题