MariaDB 10.1+是否具有变量的数组/集合类型?

时间:2016-04-30 17:21:24

标签: mariadb

MariaDB是否有类似变量的数组? (不是存储到表中。相反,我希望使用它们来保存在查询中单独使用的值。)

例如:

SELECT ... WHERE x = myVAR[1];

1 个答案:

答案 0 :(得分:0)

你是什么意思?

SELECT ... FROM tbl WHERE x IN (1,4,767,443)

SELECT ... FORM tbl .. -- and get any "rows"; this is like an array.

SET @variable := 123;  -- not an array, but a scalar, for use thus:
SELECT ... WHERE x = @variable;