【发布时间】:2018-12-02 02:06:06
【问题描述】:
我需要在一个表中找到一个字符串的子字符串,但是不同的列,比如
TableA
+-------+------------+
| name | school |
+-------+------------+
| jhon | st.jhon |
+-------+------------+
| mary | st.mary |
+-------+------------+
| mike | st.patrick |
+-------+------------+
我需要在 st.mary 中找到一个诸如 mary 之类的子字符串
我尝试做select name, school from TableA where name like ('%',school,'%'),但它不起作用。
【问题讨论】:
-
定义“不工作”
-
@mustaccio 我的意思是,我得到了一张空桌子
标签: sql database select db2 sql-like