为了安全起见操作mysql数据库时最好开启事务,看结果是否符合预期,在commit进行提交

START TRANSACTION;
-- INSERT INTO test_tab VALUES    (17, '2');
-- INSERT INTO test_tab VALUES    (18, '3');
-- INSERT INTO test_tab VALUES    (19, '3');
#DECLARE i INTEGER DEFAULT 100;
set @i = 1000;
UPDATE test_tab SET f1=@i+1  WHERE f1=99 ;

#SELECT * from test_tab;
SELECT row_count();
SELECT * from test_tab;

#COMMIT;