refactor:EXISTSの中身のSELECT句をIDのみに変更
This commit is contained in:
parent
5a0b19f4d8
commit
2d9d1308b5
@ -28,7 +28,7 @@ BEGIN
|
||||
tt.end_datetime = "9999-12-31 00:00:00"
|
||||
AND NOT EXISTS (
|
||||
SELECT
|
||||
*
|
||||
tt.id
|
||||
FROM
|
||||
$$target_table_all$$ tta
|
||||
WHERE
|
||||
@ -37,8 +37,8 @@ BEGIN
|
||||
)
|
||||
';
|
||||
SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_table$$", target_table);
|
||||
SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_table_all$$", target_table_all);
|
||||
SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_column$$", target_column);
|
||||
SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_table_all$$", target_table_all);
|
||||
SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_column$$", target_column);
|
||||
PREPARE update_end_datetime_stmt from @update_end_datetime;
|
||||
EXECUTE update_end_datetime_stmt;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user