MariaDB是否有类似变量的数组? (不是存储到表中。相反,我希望使用它们来保存在查询中单独使用的值。)
例如:
SELECT ... WHERE x = myVAR[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;