我想寫出查找出數據庫中U_Name列中前後加逗號可以匹配結果的。
下面兩條語句都不行,求高手幫忙解答一下應該如何寫,謝謝。
select U_ID,U_Name, ',' + U_Name + ',' as U_Name2 from Biao where U_Name2 like '%,張三,李四,王五,%';
select U_ID,U_Name from Biao where ',' + R_Name + ',' like '%,張三,李四,王五,%';
select U_ID,U_Name from Biao where R_Name RegExp ".*,{1}張三,李四,王五,.*"