DataGrip 中的无效更新 SQL
Invalid update SQL in DataGrip
我在我的 DataGrip 上写了一个 MySQL 更新 SQL 来更新错误的数据:
update common_express_track set step = 135 where express_id in (33, 235, 237) and business_source = 0 and step = 0 and content = 'Out For Delivery' order by content;
我执行了,控制台显示“61 rows affected in 7s 530ms”,然后我执行了另一个查询语句以确保数据已被修改。
select * from common_express_track where express_id in (33, 235, 237) and business_source = 0 and step = 0 and content = 'Out For Delivery' order by content;
然后控制台显示“在 3 秒 751 毫秒内检索到 0 行”。
但是当我重新启动DataGrip并再次执行查询语句时,我得到了61行,这意味着更新语句没有起作用,我不知道为什么,是缓存还是什么?
如何解决这个问题?
当您执行查询时,您应该使用 Autocommit
然后在数据库视图中单击 table,您将看到 refresh
尝试在查询中使用 Autocommit
,在浏览数据时尝试使用 refresh
。应该有帮助。
我在我的 DataGrip 上写了一个 MySQL 更新 SQL 来更新错误的数据:
update common_express_track set step = 135 where express_id in (33, 235, 237) and business_source = 0 and step = 0 and content = 'Out For Delivery' order by content;
我执行了,控制台显示“61 rows affected in 7s 530ms”,然后我执行了另一个查询语句以确保数据已被修改。
select * from common_express_track where express_id in (33, 235, 237) and business_source = 0 and step = 0 and content = 'Out For Delivery' order by content;
然后控制台显示“在 3 秒 751 毫秒内检索到 0 行”。
但是当我重新启动DataGrip并再次执行查询语句时,我得到了61行,这意味着更新语句没有起作用,我不知道为什么,是缓存还是什么?
如何解决这个问题?
当您执行查询时,您应该使用 Autocommit
然后在数据库视图中单击 table,您将看到 refresh
尝试在查询中使用 Autocommit
,在浏览数据时尝试使用 refresh
。应该有帮助。