like语句后面加上逻辑表达式的不解
select * from comments where path like ‘1/4’ || ‘%’
请问这个后面加上一个 或者 % 有啥用处?
% 是通配符
select * from comments where path like ‘1/4’ || ‘%’->
select * from comments where path like ‘1/4%’
%通配符
select * from comments where path like ‘1/4’ || ‘%’
这种写法确实比较少见。直接
select * from comments where path like ‘1/4%’ 这样多好。