About 814,000 results
Open links in new tab
  1. sql - MySQL in clause string to array - Stack Overflow

    Jan 18, 2014 · FROM user WHERE instr(concat(' ,',list.list,','),concat(',',user.id,',')) > 1. It worked, can you explain how it works. You should add another table to create the link between list.id and user.id. It is not a good idea to use comma separated lists in a database.

  2. MySQL :: MySQL 9.3 Reference Manual :: 14.10 Cast Functions and …

    If BINARY is invoked from within the mysql client, binary strings display using hexadecimal notation, depending on the value of the --binary-as-hex. For more information about that option, see Section 6.5.1, “mysql — The MySQL Command-Line Client”. CAST(expr AS type [ARRAY])

  3. How to store arrays in MySQL? - Stack Overflow

    In 5.7.22, you'll want to use JSON_ARRAYAGG, rather than hack the array together from a string.

  4. convert string column values to array-like values in mysql

    Sep 19, 2023 · UPDATE test SET tags = STRING_TO_ARRAY(tags, ' ') WHERE tags IS NOT NULL; For MySQL. Here you will have to use your programming skills to make this dynamic.

  5. mysql函数string_to_array - CSDN博客

    Jul 22, 2024 · string_to_array函数是MySQL中一个非常实用的字符串处理函数,它可以方便地将字符串按照指定的分隔符分割成数组。通过本文的介绍和示例,相信您已经对string_to_array函数有了更深入的了解。在实际的数据库开发和数据处理中,合理利用这个函数可以大大提高我们 ...

  6. The Right Way to Store an Array in MySQL 8 - Sling Academy

    Jan 26, 2024 · One of the most robust methods to store arrays in MySQL is through normalization – using a secondary table to store array elements and then associating them with the primary entry via a foreign key.

  7. 14.10 Cast Functions and Operators - Oracle

    Cast functions and operators enable conversion of values from one data type to another. The BINARY operator converts the expression to a binary string (a string that has the binary character set and binary collation).

  8. mysqlstring_to_array函数 - 51CTO博客

    Feb 2, 2024 · ARRAY_TO_STRING函数将数组(数组变量,数组对象,数组类型)array_var的成员以split_string作为分隔符进行连接,若数组成员中存在NULL且replace_string非空,则将NULL成员替换为replace_string后进行连接,函数返回一个VARCHAR类型的字符串。

  9. sql - How do I convert a column to an array in mysql ... - Stack Overflow

    Apr 5, 2022 · you can use group_concat function in MySQL: query is below: select user_id, group_concat(",",Connection_type) as connecttion_type from table group by user_id

  10. How CAST() Works in MySQL - Database.Guide

    Apr 5, 2023 · CAST(expr AS type [ARRAY]) Where expr is the value to convert, and type is the data type that you want it converted to. The optional ARRAY keyword can be used in MySQL 8.0.17 and higher to create a multi-valued index on a JSON array as part of CREATE INDEX, CREATE TABLE, and ALTER TABLE statement.