select attachment_id, task_id, file_name, file_path, file_size, file_type, attachment_category, upload_time, upload_by, synced_to_image_data, sync_time, image_data_id from sys_task_attachment insert into sys_task_attachment task_id, file_name, file_path, file_size, file_type, attachment_category, upload_time, upload_by, synced_to_image_data, sync_time, image_data_id, #{taskId}, #{fileName}, #{filePath}, #{fileSize}, #{fileType}, #{attachmentCategory}, #{uploadTime}, #{uploadBy}, #{syncedToImageData}, #{syncTime}, #{imageDataId}, update sys_task_attachment task_id = #{taskId}, file_name = #{fileName}, file_path = #{filePath}, file_size = #{fileSize}, file_type = #{fileType}, attachment_category = #{attachmentCategory}, upload_time = #{uploadTime}, upload_by = #{uploadBy}, synced_to_image_data = #{syncedToImageData}, sync_time = #{syncTime}, image_data_id = #{imageDataId}, where attachment_id = #{attachmentId} delete from sys_task_attachment where attachment_id = #{attachmentId} delete from sys_task_attachment where attachment_id in #{attachmentId} delete from sys_task_attachment where task_id = #{taskId}