oracle+ mybatis 插入数据时返回插入uuid

oracle使用sys_guid()来自动获取uuid时,需要把此id返回

 
	
      		SELECT sys_guid() FROM DUAL
      
	insert into t_zone_task values(#{uuid}, #{title}, #{author}, #{subjectId}, sysdate, #{duration}, #{state})
测试代码:
public void addTask(Task task) {
		System.out.println("before:" + task.getUuid());
		taskMapper.addTask(task);
		System.out.println("after:" + task.getUuid());
	}


你可能感兴趣的:(oracle+ mybatis 插入数据时返回插入uuid)