select * from comments where path like '1/4' || '%'
请问这个后面加上一个 或者 % 有啥用处?

解决方案 »

  1.   

    实际上 我今天看到一本老外写的书,叫做sql 反模式 语句的作用是取出所有 1/4 1/4/5 1/4/5/7 的列
      

  2.   

    select * from comments where path like '1/4' || '%'->
    select * from comments where path like '1/4%'%通配符
      

  3.   

    select * from comments where path like '1/4' || '%'这种写法确实比较少见。直接
    select * from comments where path like '1/4%' 这样多好。