mysql文字列関数のrepeat使い方
1107 ワード
構文
REPEAT(str,count)
Returns a string consisting of the string str repeated count times. If count is less than 1, returns an empty string. Returns NULL if str or count are NULL.
文字列strの繰り返しcount回数からなる文字列を返します.countが1未満の場合、空の文字列が返されます.strまたはcountがNULLの場合、NULLが返されます.
≪インスタンス|Instance|emdw≫
その他
mysqlにはREPEATというキーワードがあります
REPEAT(str,count)
Returns a string consisting of the string str repeated count times. If count is less than 1, returns an empty string. Returns NULL if str or count are NULL.
文字列strの繰り返しcount回数からなる文字列を返します.countが1未満の場合、空の文字列が返されます.strまたはcountがNULLの場合、NULLが返されます.
≪インスタンス|Instance|emdw≫
SELECT repeat('MySQL', 3); # MySQLMySQLMySQL
SELECT repeat('MySQL', -1); #
SELECT repeat(NULL , 3); # null
SELECT repeat('MySQL', NULL ); # null
その他
mysqlにはREPEATというキーワードがあります