33update.mql 626 B

123456789101112131415161718192021222324252627282930313233
  1. update /test/basic3 set v_text=NULL where v_varchar!='3'
  2. /**
  3. onerror(must,"can't update primary key")
  4. **/
  5. ;
  6. select class,id,vtime,v_varchar,v_string from /test/basic3 where v_varchar!='3'
  7. /**
  8. output()
  9. count(3)
  10. **/
  11. ;
  12. update /test/basic3 set v_string=NULL where v_varchar!='3'
  13. ;
  14. select class,id,vtime,v_varchar,v_string from /test/basic3 where v_varchar!='3'
  15. /**
  16. output()
  17. matchcount(v_string,null,3)
  18. **/
  19. ;
  20. update /test/basic3 set v_string='test update null' where v_varchar!='3'
  21. ;
  22. select class,id,vtime,v_varchar,v_string from /test/basic3 where v_varchar!='3'
  23. /**
  24. output()
  25. matchcount(v_string,"test update null",3)
  26. **/
  27. ;