Mysql: Find rows where column value ends with a specific substring

前端 未结 4 1262
情书的邮戳
情书的邮戳 2021-02-18 19:20

I have a column url where all the values are urls. I\'m trying to update the value of a different column where-ever the aforementioned url ends with .pdf

4条回答
  •  别那么骄傲
    2021-02-18 19:41

    I might be oversimplifying... but based on your description, would LIKE solve your problem?

    UPDATE YourTable
    SET DifferentColumn = 'NewValue'
    WHERE Url LIKE '%.pdf'
    

提交回复
热议问题