当前位置:   article > 正文

mysql 数组类型_像PostgreSQL中一样,MySQL中是否有任何数组数据类型?

mysql 数组类型_像PostgreSQL中一样,MySQL中是否有任何数组数据类型?

bd96500e110b49cbb3cd949968f18be7.png

I need to store arrays of integers in a MySQL database. In there something equivalent to this in MySQL?

CREATE TABLE tictactoe (

squares integer[3][3]

);

I want to store matrices with dimension 20x6. I don't feel like creating a table with 120 columns. There is no need to query on this field, just need to store and retrieve full matrices.

If it matters, i use Perl.

解决方案

No, there is no such thing. There is an open worklog for that, but no progress has been made on implementing this feature.

You have to emulate this somehow, using either multiple fields (9 in your case) or pack the integers together into a larger datatype (blob for example).

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/999786
推荐阅读
相关标签
  

闽ICP备14008679号