質問編集履歴

1

追記

2020/06/17 09:37

投稿

Yuiti628
Yuiti628

スコア71

test CHANGED
File without changes
test CHANGED
@@ -119,3 +119,43 @@
119
119
 
120
120
 
121
121
  -----
122
+
123
+
124
+
125
+
126
+
127
+ 追記
128
+
129
+ 指摘をいただき、case を使ってもできないです (T . T)
130
+
131
+
132
+
133
+ ```ここに言語を入力
134
+
135
+ UPDATE buzz.test SET kyouka = (
136
+
137
+ CASE WHEN not like ('%社会%') then CONCAT(kyouka, '社会')
138
+
139
+ ELSE CONCAT(kyouka, '')
140
+
141
+ END)
142
+
143
+ ,score= 8
144
+
145
+ where id =1
146
+
147
+ ```
148
+
149
+
150
+
151
+ ```
152
+
153
+ SQLエラー [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like ('%社会%') then CONCAT(kyouka, '社会')
154
+
155
+ ELSE CONCAT(kyouka, '')
156
+
157
+ END)
158
+
159
+ ' at line 2
160
+
161
+ ```