diff --git a/class-3/src/main/java/com/aliyun/polardbx/demo/class3/XCanalCHDemo.java b/class-3/src/main/java/com/aliyun/polardbx/demo/class3/XCanalCHDemo.java index e745757..f22fa4c 100644 --- a/class-3/src/main/java/com/aliyun/polardbx/demo/class3/XCanalCHDemo.java +++ b/class-3/src/main/java/com/aliyun/polardbx/demo/class3/XCanalCHDemo.java @@ -118,7 +118,7 @@ private static void printColumn(Statement statement, List columns) { System.out.println(column.getName() + " : " + column.getValue() + " update=" + column.getUpdated()); nameColumnMap.put(column.getName(), column); } - String sql = "INSERT INTO test(id, name) values(" + nameColumnMap.get("id").getValue() + ",\"" + nameColumnMap.get("name").getValue() + "\")"; + String sql = "INSERT INTO test(id, name) values(" + nameColumnMap.get("id").getValue() + ",'" + nameColumnMap.get("name").getValue() + "')"; try { statement.executeUpdate(sql); System.out.println("SQL done: " + sql);