Conclusion. As you can see, SQL Server does not include arrays. But we can use table variables, temporary tables or the STRING_SPLIT function. However, the STRING_SPLIT function is new and can be used only on SQL Server 2016 or later versions.
How do you store an array of values in SQL?
CREATE TABLE `contents_arr` (`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,`arr_serialize1` varchar(255) NOT NULL,`arr_serialize2` varchar(255) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8; Define two arrays — $names_arr, and $users_arr. $users_arr Array should be an Associative Array. serialize([Array]);
Can we store an array in MySQL?
Although an array is one of the most common data types in the world of programming, MySQL actually doesn’t support saving an array type directly. You can’t create a table column of array type in MySQL. The easiest way store array type data in MySQL is to use the JSON data type.