回答編集履歴

3

修正

2018/05/10 02:06

投稿

sazi
sazi

スコア25173

test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  not exists(select 1 from cp_plan where id = 176)
24
24
 
25
- and id in (select mid from (SELECT max(id) as mid from cp_plan) as tmp)
25
+ and id = (select mid from (SELECT max(id) as mid from cp_plan) as tmp)
26
26
 
27
27
  )
28
28
 

2

修正

2018/05/10 02:06

投稿

sazi
sazi

スコア25173

test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  not exists(select 1 from cp_plan where id = 176)
24
24
 
25
- and id=(select mid from (SELECT max(id) as mid from cp_plan) as tmp)
25
+ and id in (select mid from (SELECT max(id) as mid from cp_plan) as tmp)
26
26
 
27
27
  )
28
28
 

1

修正

2018/05/10 01:58

投稿

sazi
sazi

スコア25173

test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  not exists(select 1 from cp_plan where id = 176)
24
24
 
25
- and id=(SELECT max(id) from cp_plan)
25
+ and id=(select mid from (SELECT max(id) as mid from cp_plan) as tmp)
26
26
 
27
27
  )
28
28