fork download
  1. -- setup
  2. CREATE TABLE tabulka (`id` int, `balik` varchar(100));
  3. INSERT INTO tabulka (`id`, `balik`) VALUES (154602, 'CV029222553CZ');
  4.  
  5. -- before
  6. SELECT 'before';
  7. SELECT * FROM tabulka;
  8.  
  9. -- update
  10. UPDATE tabulka SET balik = 'abc' WHERE id = '154602' AND (balik != 'CV029222553CZ' OR balik is NULL) LIMIT 1;
  11.  
  12. -- after
  13. SELECT ''; SELECT 'after';
  14. SELECT * FROM tabulka;
  15.  
  16. -- update with equality
  17. UPDATE tabulka SET balik = 'abc' WHERE id = '154602' AND (balik == 'CV029222553CZ' OR balik is NULL) LIMIT 1;
  18.  
  19. -- after
  20. SELECT ''; SELECT 'after equality change';
  21. SELECT * FROM tabulka;
Success #stdin #stdout 0s 3452KB
stdin
Standard input is empty
stdout
before
154602|CV029222553CZ

after
154602|CV029222553CZ

after equality change
154602|abc