Advertisement
nikeza

Untitled

Feb 5th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.31 KB | None | 0 0
  1. PDATE comments
  2. SET `comment` = (
  3. CASE
  4.         WHEN id % 2 = 0 THEN 'Very good article.'
  5.         WHEN id % 3 = 0 THEN 'This is interesting.'
  6.         WHEN id % 5 = 0 THEN 'I definitely will read the article again.'
  7.         WHEN id % 7 = 0 THEN 'The universe is such an amazing thing.'
  8.         ELSE  `comment`
  9. end
  10. ) WHERE id BETWEEN 1 AND 15;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement