从Cust表中获取记录

时间:2017-06-04 17:51:41

标签: sql-server tsql

1   abc_chg
2   a_dhj
3   axc_kk
4   sdsd

我在表Cust中有四条记录。我想只获得那些包含下划线的记录。

我该怎么做?

1 个答案:

答案 0 :(得分:0)

您可以通过以下方式将LIKE与通配符一起使用:

Select *
from   Cust
where  Field LIKE '%[_]%';