1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MySQL 5.7 でデータの先頭or末尾に文字を追加

Last updated at Posted at 2020-12-10

何てことはなかった。。。
全データに対して文字連結 or INSERTする
全データの指定方法がわかってなかった。。。カラム名そのままでいいのね

UPDATE table SET content=CONCAT('先頭に追加する文字',  content, '末尾に追加する文字') 
UPDATE table SET content=INSERT(content,1,0,'先頭に追加する文字');
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?