Help us understand the problem. What is going on with this article?

SQL 文字列を連結する

More than 3 years have passed since last update.

SQL 文字列を連結する

概要

  • SQLで文字列を連結したい場合は、CONCAT関数を使用する
  • 引数には2つ以上の文字列を指定する

構文

CONCAT ( string_value1, string_value2 [, string_valueN ] )  

使用例

example.csv
SELECT CONCAT('ひとよ','ひとよに','ひとみごろ') AS result;

結果

result
ひとよひとよにひとみごろ
sgwr1129
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away